Skip to content

syntax error - invalid string: control character must be escaped; last read: '"ass<U+0000>'; expected string literal #2373

Answered by nlohmann
rahul233343 asked this question in Q&A
Discussion options

You must be logged in to vote

A JSON string must not contain control characters unless they are escaped with \ or via \uxxxx:

That is, a null byte in a string must be escaped like \u0000. I think your server may be too lax on this - or the null byte is the symptom of a bigger issue.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@rahul233343
Comment options

@nlohmann
Comment options

@rahul233343
Comment options

Answer selected by rahul233343
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants