This commit is contained in:
nlohmann committed 2026-12-06 16:17:12 +00:00
1 parent de55a43b4a
commit dfea8d2114
458 files changed
+6728 -6271

No files matched your search

+3
View File
@@ -43,6 +43,8 @@ Linear in the size of the result. With an `indent`, every line starts with up to
## Notes
Once the output reaches 512 characters, the result reserves 1 MiB, and four times as much whenever that is not enough, up to 64 MiB. This saves copies and page faults while the string grows, but the returned string can have a much larger `capacity()` than `size()`. Call `shrink_to_fit()` on a result that is kept for long.
Floating-point numbers are written with the fewest digits that read back as the same value (for `double`; see [number handling](https://json.nlohmann.me/features/types/number_handling/#number-serialization)).
Binary values are serialized as an object containing two keys:
@@ -182,3 +184,4 @@ string with ignored invalid characters: "äü"
- Serialization of binary values added in version 3.8.0.
- Error handler `keep` added in version 3.13.0 unreleased.
- Doubles are written with the shortest digits (Żmij instead of Grisu2) since version 3.13.0 unreleased; about 0.1% of doubles are written differently, most of them with fewer digits.
- The result reserves capacity for outputs of 512 characters or more since version 3.13.0 unreleased.