-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
JSON escape quotes #574
Comments
This indicates a parse error in the first byte. The '?' looks as if there is an unexpected control character without proper ASCII representation. Could you check whether the |
Yes, readBuffer in my case is |
Do you set the value yourself or do you receive it from another system? Could you check whether |
How damm, yes you right ! By doing |
Hi,
I'm getting JSON from PHP server with curl and I save it to a std::string variable.
So :
std::cout << input;
// {"error":"params problem","vector":"A5+myu8a5QW7Gk98mWws7A=="}
I'd like to deserialize this into a JSON object by doing :
json decodedJson(input)
But here when I make a print of input.dump(4) I'm getting just an escaped string of input.
So I tried a different way :
json decodedJson = json::parse(readBuffer);
And here I have this following error :
libc++abi.dylib: terminating with uncaught exception of type nlohmann::detail::parse_error: [json.exception.parse_error.101] parse error at 1: parse error - unexpected '?'
Is it normal ?
Thanks
The text was updated successfully, but these errors were encountered: