This commit is contained in:
nlohmann committed 2026-10-08 07:22:44 +00:00
1 parent 4e5f6962d3
commit 207a4df1e4
20 files changed
+356 -311

No files matched your search

+1
View File
@@ -64,6 +64,7 @@ serialization fails by default. The fourth argument of `dump` selects an
- `strict` (default) — throw a [`type_error.316`](../home/exceptions.md#jsonexceptiontype_error316) exception.
- `replace` — replace invalid bytes with the Unicode replacement character U+FFFD (`�`).
- `ignore` — silently drop invalid bytes.
- `keep` — copy invalid bytes to the output unchanged; the result is not valid UTF-8.
??? example "Example: serialize invalid UTF-8 with different error handlers"