-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to read complex Unicode string embedded in JSON #4417
Comments
Note I do have a hacky workaround for this in my CMakeLists.txt, which nicely demonstrates that it really is just that one test case which appears to be causing issues for nlohmann-json:
|
The error message states the problem
This check is implemented in https://github.com/nlohmann/json/blob/develop/include/nlohmann/detail/input/lexer.hpp#L331. I don't know why other validators accept this JSON, but it contains invalid UTF-8. Update: References: https://www.unicode.org/versions/Unicode15.1.0/ch03.pdf#G2630 |
Thanks @nlohmann I will close this issue and report it directly to WHATWG. I can confirm it is just this test case with the problem; possibly other validators are not checking Unicode conformance as strictly. |
Description
I tried to load urltestdata.json in nlohmann-hson, and get:
But this is the official WHATWG URL validation test set, and multiple JSON validators that I tried online
Reproduction steps
A simple parse of the above file reproduces it:
Expected vs. actual results
I expected this file to parse without errors.
Minimal code example
Error messages
The text was updated successfully, but these errors were encountered: