11.03.2014, 18:55, "Felipe Gasper" <[email protected]>: > I’m not wild about the unquoted keys: too many exceptions to the rule. > (Are hard spaces allowed? etc.)
See ES5 spec. For example, hard spaces are not allowed because they are not unicode letters. > Also not a fan of single quotes. I don’t see what purpose that serves, > unless the format is to use them exclusively in lieu of double-quotes .. > which, for most of us, would indeed be easier to type. Single quotes are used to avoid escaping of double quotes and vice versa. > IMO JSON should simply allow comments (// or /**/) and trailing commas. > These are SORELY needed in JSON for it to be really human-friendly. Nope. Guess what, JSON5 isn't human-friendly enough as is, and there are already some thoughts about JSON6 with template strings. :) > Perl’s JSON::XS adds EOL comment support but using # instead of //. (wtf?!?) > > On 11.3.14, 7:38 AM, Samuel Paul wrote: > >> Hi Aseem, >> Is it possible to get the parsed tree of the json object having location >> information(line and character) for each property, value, comment,etc? >> >> Thanks >> Sam >> >> On Monday, 28 May 2012 08:02:23 UTC+5:30, Aseem Kishore wrote: >> >> I love JSON, but writing it by hand has always been a pain. >> >> Needing to (double-)quote keys, not being able to document the data >> with comments, and not having support for trailing commas or >> multi-line strings -- all of which are available and work perfectly >> well on modern ES5 engines, including Node. >> >> After stewing on this for over a year, I bit the bullet today and >> made this idea a reality: a "JSON5" parser that supports these and >> other ES5 features in JSON. >> >> https://github.com/aseemk/json5 <https://github.com/aseemk/json5> >> >> It's built off of Douglas Crockford's own eval()-free JSON parser, >> and it's available now on npm as "json5". >> >> I'd love to get your guys' thoughts and feedback on this. And it'd >> be a dream if package.json files could be written in this looser >> syntax one day. =) >> >> Cheers, >> Aseem >> >> -- >> -- >> Job Board: http://jobs.nodejs.org/ >> Posting guidelines: >> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/nodejs?hl=en?hl=en >> >> --- >> You received this message because you are subscribed to the Google >> Groups "nodejs" group. >> To unsubscribe from this group and stop receiving emails from it, send >> an email to [email protected] >> <mailto:[email protected]>. >> For more options, visit https://groups.google.com/d/optout. > > -- > -- > Job Board: http://jobs.nodejs.org/ > Posting guidelines: > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > You received this message because you are subscribed to the Google > Groups "nodejs" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/nodejs?hl=en?hl=en > > --- > You received this message because you are subscribed to the Google Groups > "nodejs" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. -- -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en --- You received this message because you are subscribed to the Google Groups "nodejs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
