mirror of
https://github.com/nlohmann/json.git
synced 2026-10-03 13:10:33 +00:00
error_handler_t::ignore drops invalid bytes although its docs promised to copy them (#4552). Add keep, which copies each ill-formed subsequence byte-for-byte while still escaping valid characters. Fixes #4552 Signed-off-by: Niels Lohmann <mail@nlohmann.me>
5 lines
224 B
Plaintext
5 lines
224 B
Plaintext
[json.exception.type_error.316] invalid UTF-8 byte at index 2: 0xA9
|
|
string with replaced invalid characters: "ä�ü"
|
|
string with ignored invalid characters: "äü"
|
|
string with kept invalid characters: 22 c3 a4 a9 c3 bc 22
|