On Thu, Nov 21, 2013 at 7:53 AM, Allen Wirfs-Brock
<allen(_at_)wirfs-brock(_dot_)com> wrote:
Just to be clear about this. My tests directly tested JavaScript built-in
JSON parsers WRT to BOM support in three major browsers. The tests directly
invoked the built-in JSON.parse functions and directly passed to them a
source strings that was explicitly constructed to contain a BOM code point .
This was done to ensure that the all transport layers (and any transcodings
they might perform) were bypassed and that we were actually testing the real
built-in JSON parse functions.
It would be surprising if JSON.parse() accepted a BOM, since it
doesn't take bytes as input.
However, XHR's responseType = "json" exercises browsers in a way where
the input is bytes from the network. From the perspective of JSON
support in XHR,
http://lists.w3.org/Archives/Public/www-tag/2013Nov/0149.html (which
didn't reach the es-discuss part of this thread previously) applies.
--
Henri Sivonen
hsivonen(_at_)hsivonen(_dot_)fi
http://hsivonen.fi/