Sunday, October 5, 2008

json: comments

I recently read some interesting observation that JSON format doesn't declare the comment strings. Though, for example, XML declares comment strings. The delusion here is that JSON is a data-interchange format, not a language. Yes, programming languages define format of comments. At least all languages I know have comments. But JSON is _not_a_language_. And XML is a language, not a format. This is my consideration. JSON is for machine-to-machine interchange. Machines ignore comments. Anyway you can reserve some part of message for comment:

{
    'comment': '',
}

No comments: