mirror of
https://github.com/nlohmann/json.git
synced 2026-03-23 01:12:44 +00:00
🚧 WIP for #4552
This commit is contained in:
@@ -529,6 +529,12 @@ class serializer
|
||||
// thus removing/ignoring the invalid characters
|
||||
bytes = bytes_after_last_accept;
|
||||
|
||||
// fix for #4552
|
||||
if (error_handler == error_handler_t::ignore)
|
||||
{
|
||||
bytes += undumped_chars;
|
||||
}
|
||||
|
||||
if (error_handler == error_handler_t::replace)
|
||||
{
|
||||
// add a replacement character
|
||||
|
||||
Reference in New Issue
Block a user