Re: BOMs

Hello Bjoern,

Monday, November 18, 2013, 2:48:19 PM, you wrote:


> In other words, always passing a UTF-8 encoded byte string to the byte
> string parsing part of the JSON implementation.

Yes, a byte stream will contain a BOM if one is present.

> RFC 4627 is the only
> specification for the application/json on-the-wire format and it does
> not mention anything about Unicode signatures. Looking for certain byte
> sequences at the beginning and treating them as a Unicode signature is
> the same as looking for `/* ... */` and treating it as a comment.

No, because /* */ are characters and are found in a character stream.
And a character stream does not contain a BOM as a BOM is not
character data.

RFC 4627 doesn't need to say this, because Unicode says it.

If JSON mixes up characters and bytes there will of course be
confusion. But hopefully it doesn't, as this is not 1990 anymore.



-- 
Best regards,
 Chris                            mailto:chris@w3.org

Received on Tuesday, 19 November 2013 21:32:02 UTC