On Mon, Jun 11, 2012 at 9:17 AM, Joni Freeman <
freema...@gmail.com> wrote:
> Hi,
>
> The spec says (
http://www.ietf.org/rfc/rfc4627.txt):
>
> "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)."
>
> I think the spec means that a JSON string "endwith\u0000" should not be
> parseable at all. Trying to
> parse that should then be a parse error.
Too late with previous response :-) I dont think this is what the spec
says, just that NUL should always be escaped, which it is. E.g.
further in the spec:
"Any character may be escaped. If the character is in the Basic
Multilingual Plane (U+0000 through U+FFFF), then it may be
represented as a six-character sequence: a reverse solidus, followed
by the lowercase letter u, followed by four hexadecimal digits that
encode the character's code point."
So \u0000 is a perfectly valid unicode character and, imo, should
parsed as such.