Question about boost.json and unescaped control characters

Pavel Vazharov via Boost-users <[email protected]> Thu, 16 Oct 2025 10:11:09 +0300
Newsgroups gmane.comp.lib.boost.user
Message-ID <CAK9EM1-RdTbWCtrtb+Twy5CYi7CBSXKHtBZkh5BbECyY27YVeA@mail.gmail.com>
Hi there,

Is it possible to "make" the boost.json parser allow unescaped control
characters in JSON string values?
It seems to me that `allow_invalid_utf8` and `allow_invalid_utf16`
parse_options doesn't help with this. I also looked at the source code of
`parse_string` function and it seems to me that even if I provide a handler
with `on_string` member function the parser will still throw an error
because of the unescaped control characters before calling `on_string`.
Maybe my only option is to escape such control characters before giving the
JSON data to the boost json parser?

Thanks,
Pavel.
_______________________________________________
Boost-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://lists.boost.org/mailman3/lists/boost-users.lists.boost.org/
Archived at: https://lists.boost.org/archives/list/[email protected]/message/KNLEBWSEU73TZ2TGZJKQKJYBDKRPGYU7/