The Wayback Machine - http://web.archive.org/web/20130101004216/http://tech.groups.yahoo.com:80/group/json/message/152
Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

json · JSON JavaScript Object Notation

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 580
  • Category: Data Formats
  • Founded: Jul 19, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Topic List    | 
Re: Comments Last >>
Posted By: Sat Dec 24, 2005 8:31 pm  |
JSON does not have comments. A JSON encoder MUST NOT output comments.
A JSON decoder MAY accept and ignore comments.

Comments should never be used to transmit anything meaningful. That is
what JSON is for.







Last >>
Expand Messages Author Sort by Date

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 continue...
Atif Aziz
azizatif Send Email
Dec 24, 2005
6:53 pm

JSON does not have comments. A JSON encoder MUST NOT output comments. A JSON decoder MAY accept and ignore comments. Comments should never be used to transmit...
Douglas Crockford
douglascrock... Send Email
Dec 24, 2005
8:32 pm

... Not now, but it used to have comments. I believe it's time to start versioning the spec. Several things have changed, and people have different ...
Martin Cooper
mfncooper Send Email
Dec 25, 2005
1:54 am

As Martin already said, JSON used to have comments. I don't know what led to the stringent opinion (perhaps from field experience) that they are so harmful as...
Atif Aziz
azizatif Send Email
Dec 25, 2005
7:21 pm

I had posted in the original thread talking about comments and wanted to follow up here as well. While meta data, like comments, might be useful, the only way...
MPCM
mpcmtechnolo... Send Email
Dec 26, 2005
4:22 am

These were the reasons for removing comments: First, comments turned out to not be very useful. Second, comments were the most difficult feature to support in...
Douglas Crockford
douglascrock... Send Email
Dec 26, 2005
2:15 pm

... Then why not label the current version as JSON 1.0? -- Martin Cooper ... [Non-text portions of this message have been removed]...
Martin Cooper
mfncooper Send Email
Dec 26, 2005
5:59 pm

I am assuming the order of reasons list was not significant. ... This is always rather subjective. When you consider that all text formats strive for and boast...
Atif Aziz
azizatif Send Email
Dec 27, 2005
5:17 pm

... I would like to understand your intentions. Where commentary is important, it can be encoded directly in JSON, where the outermost object resembles a COBOL...
Douglas Crockford
douglascrock... Send Email
Jan 3, 2006
4:38 pm

... It can be useful to comment-out sections of hand-coded JSON for development/testing, and to have inline human-readable comments about what is going on. A...
Jim Washington
jimcburg Send Email
Jan 3, 2006
6:00 pm

... I don't really consider comments as meta-data, unless you mean in the style of javadocs. I see comments as much a presentation aspect of the syntax as...
Atif Aziz
azizatif Send Email
Dec 27, 2005
6:27 pm

Jim has said it sweetly what pretty much everyone has been saying on this thread (perhaps just in too many words). He's also hit my points right on. ... If...
Atif Aziz
azizatif Send Email
Jan 3, 2006
6:39 pm

... It's a shame that neither the previous version nor the current version aren't versioned... ;-) -- Martin Cooper (luckily I have a copy on disk) or that the...
Martin Cooper
mfncooper Send Email
Jan 3, 2006
6:49 pm

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...
MPCM
mpcmtechnolo... Send Email
Jan 3, 2006
7:03 pm

... Huh? If I'm writing an encoder that takes a Java data structure and encodes it into JSON, it would make perfect sense to me to generate comments (in ...
Martin Cooper
mfncooper Send Email
Jan 3, 2006
7:24 pm

I'll jump in here and say that even a draconian syntax like XML (arguably the most used data stream format on the planet) supports comments. The whole point of...
Dave Balmer
dbalmerjr Send Email
Jan 3, 2006
7:58 pm

... encodes ... encoded. So, ... encoding ... Why would you do that? What expectation do you have of the receiver? Why waste the bandwidth? What, specifically,...
Douglas Crockford
douglascrock... Send Email
Jan 3, 2006
8:22 pm

... debug information is *IN*valuable , for us weak-minded developers that cant guess whats being passed back and forth, i use html comments in lots of...
f3l
kyoosho Send Email
Jan 3, 2006
8:40 pm

... In this specific example, I might choose to do this because multiple Java types map to the same JSON type, and it could help me a lot with identifying ...
Martin Cooper
mfncooper Send Email
Jan 3, 2006
9:33 pm

I am completely stumped. Did the rest of my message not present the cases? Do HTML, XML and YAML or just about any text format not acknowledge the utility of...
Atif Aziz
azizatif Send Email
Jan 4, 2006
12:24 am

I think Martin's response (#177 [1]) has addressed most points so I just want to add one thing simply. Given any text format, comments are just about as useful...
Atif Aziz
azizatif Send Email
Jan 4, 2006
12:39 am

... 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...
Atif Aziz
azizatif Send Email
Jan 4, 2006
12:54 am

I do have to say, unless I've missed something big in the thread, the only thing I see keeping comment support *out* of the new version is "because". As in...
Dave Balmer
dbalmerjr Send Email
Jan 4, 2006
1:41 am

Funny thing is, YAML was designed for human consumption as much as a language-neutral serializing format. And JSON's ancestry (JavaScript) is more in the LISP...
Peter Ring
peter17ring Send Email
Jan 5, 2006
8:25 am
 First  |  |  Next > Last 
 | 

Copyright � 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help