mirror of
https://github.com/nlohmann/json.git
synced 2026-10-10 08:27:13 +00:00
Add tests for error_handler_t::keep in dump() (#4555)
Squashed onto develop from: - Add error_handler_t::keep to copy invalid UTF-8 bytes unchanged - Mention error_handler_t::keep in the README Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
1 parent
e752688b52
commit
3c465beb61
7 files changed
+76
-4
No files matched your search
@@ -771,6 +771,7 @@ as well for a string value or object key that is not valid UTF-8 if their `error
|
||||
- Pass an error handler as last parameter to the `dump()` function to avoid this exception:
|
||||
- `json::error_handler_t::replace` will replace invalid bytes sequences with `U+FFFD`
|
||||
- `json::error_handler_t::ignore` will silently ignore invalid byte sequences
|
||||
- `json::error_handler_t::keep` will copy invalid byte sequences to the output unchanged
|
||||
|
||||
### json.exception.type_error.317
|
||||
|
||||
|
||||
Reference in new issue
Block a user