parseJSON bug
Tyler Jameson Little
beatgammit at gmail.com
Thu Aug 8 07:46:15 PDT 2013
On Thursday, 8 August 2013 at 13:56:15 UTC, Dicebot wrote:
> On Thursday, 8 August 2013 at 13:49:22 UTC, bearophile wrote:
>> In my opinion we should follow the formal JSON grammar.
>
> This. Anyone who wants JavaScript behavior can use own
> third-party library bust standard library must behave according
> to published standards and specifications.
Exactly. Here's the official web page complete with nice graphics
detailing the grammar: http://json.org/. I've read the JSON RFC
before, but I can't remember what it says about whitespace within
a basic value, but the graphics here make it very clear that
whitespace does *not* belong inside a value.
The real question is, is this worth fixing before std.serialize
makes it in? There will likely be other bugs once/if that's
accepted. I tried extending std.json in the past with static
reflection, but that didn't make it in for this very reason.
More information about the Digitalmars-d
mailing list