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
@@ -154,6 +154,7 @@ If a string contains invalid UTF-8 sequences (for example, because it holds data
- `strict` (default) — throw a [`type_error.316`](https://json.nlohmann.me/home/exceptions/#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: serialize invalid UTF-8 with different error handlers