|
dasmig-core 1.2.0
Shared random engine, distributions and data tiers for the dasmig generator libraries
|
A minimal, dependency-free JSON writer for to_json().
More...
#include "utf8.hpp"#include <array>#include <charconv>#include <cmath>#include <concepts>#include <cstddef>#include <cstdint>#include <memory>#include <stdexcept>#include <string>#include <string_view>#include <system_error>#include <vector>Go to the source code of this file.
Classes | |
| class | dasmig::core::json_writer |
| Builds one JSON document. More... | |
A minimal, dependency-free JSON writer for to_json().
Writes compact JSON (RFC 8259). Commas are placed automatically, misuse (a value without a key inside an object, unbalanced ends) throws, and numbers are written with std::to_chars, the shortest form that reads back to the same double, so output is identical on every platform.
JavaScript numbers are doubles: integers above 2^53 lose precision there. Write 64-bit seeds as strings (seed_signature does).
Definition in file json.hpp.