Are comments officially out of the specification? It seems so looking at the current state of the spec http://www.json.org/. ... existing decoders can continueDec 24 10:48 AM 1 of 42View SourceAre comments officially out of the specification? It seems so looking at
the current state of the spec http://www.json.org/.
>>existing decoders can continue to recognize and
Although existing decoders might do this, the absence of comments in the
specification allows future decoder implementation to have an excuse for
not recognizing comments. In the spirit of IETF RFCs, it should be
stated somewhere that a parser SHOULD recognize comments and MAY choose
to expose them through its interface.
I find comments useful solely for the purpose of debugging (and none
other). Pretty much all markup languages and even portable data
structures accommodate one form of commenting or another so why take out
something so harmless?
From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of
Sent: Wednesday, August 17, 2005 11:44 PM
Subject: [json] Re: Comments
Comments are being removed from JSON. I think that this will have
minimal impact because existing decoders can continue to recognize and
No known encoders use comments. This is not surprising because
comments are not very useful in data interchange.
This change will more closely align JSON with YAML and Python, and
will simplify the standard.
I wish to thank everyone for their comments, suggestions, and emails.
Yahoo! Groups Links
more in the LISP camp than the C camp , i.e., designed for expressive
power rather than bit-munging.
Programmers spend half their time looking at code. Ergonomics matter.
If line speed is a premium, why allow insignificant whitespace at all?
If line speed was a premium (and human consumption irrelevant), I'd be
using ASN.1 anyway; it is well established in the telecom world, and
there are tons of software and utilities that will help you with the
Think of comments as something that belong to a separate namespace. The
JSON parser should have no other business with comments than ignoring
them. If ECMAScript syntax for comments is too loose for easy parsing,
The alternative is an informal standard for comment properties that in
effect turns me into a carbon-based compiler and requires applications
to share a notation for comments anyway.
Atif Aziz wrote:
>>I think the real crux...
> As I said, I have a sneaking hunch that the real issue stems from tying
> JSON to YAML. With the comments debate generating some traffic, I feel
> less daring at this point to open up the disappearing of single-quoted
> strings gone as well as unquoted member names (at least on the decoding
> end). I am hoping Douglas will provide some insight so everyone can
> build a better understanding of the decisions that lead to several
> cutbacks in the specs. I think focusing the discussion too much on
> comments is really just avoiding a more fundamental issue. Does anyone
> agree or am I just rambling here?
> -----Original Message-----
> From: firstname.lastname@example.org [mailto:email@example.com] On Behalf Of
> Sent: Tuesday, January 03, 2006 8:03 PM
> To: firstname.lastname@example.org
> Subject: Re: [json] Re: Comments
> I think the real crux of this is simply, you cannot create a json
> format string through encoding from existing data that would contain
> comments (IIRC). It is only from people creating a json format string
> by hand.
> It is a fairly weak argument that the standard should support
> something that is not going to be used by the majority of people and
> probably not in production, from an early version of the standard,
> especially given that there are other ways get the same information
> across using the current standard.
> If you want to block out sections of json for ease of testing, then
> comment out the properties of the objects you are encoding, not /**/
> in some hand edited string.
> If you want to include comments about an object, include it in a
> property of the object.
> If you feel a need to include very detailed breakdowns, write a spec
> for the object your passing, it shouldn't be in the data stream.
> Your suggestion on wording is really avoiding the issue of why it
> should remain when there are other workable alternatives, and
> suggesting that it remain part of the standard just because it was
> once thought to be useful.
> Yahoo! Groups Links
> Yahoo! Groups Links