Do curly braces inside json string objects need to be escaped? Do curly braces inside json string objects need to be escaped? json json

Do curly braces inside json string objects need to be escaped?


No. Curly braces do not have to be escaped in JSON.


No, curly braces do not have to be escaped in JSON strings.

JSON is defined in RFC 7159. The Section 7: Strings lists the string characters that must be escaped:

All Unicode characters may be placed within the quotation marks, except for the characters that must be escaped: quotation mark, reverse solidus, and the control characters (U+0000 through U+001F).

While all characters can be escaped, curly braces do not have to be.