Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd imagine it depends on your parser, and if non-browser JSON gets more prevalent it'll probably be addressed. JSON has no format specified that I'm aware of, but some browser-like parsers will handle things like this:

  {"key":"value" // comment
  or 
  {
    // comment
    "key":"value"
Which I find wholly acceptable (though poorly supported).


Wouldn't that only work if the json/javascript is pretty-printed and not minified?

I'd think this problem of comments in JSON requires a solution that is part of the JSON specifications rather than dependent on individual parsers implementations.

Or perhaps JSON only really shines as a data interchange format and not much else.


Sorry, on iPad and accidentally downmodded your useful comment.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: