Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I was practicing JSON, then suddenly, I came across a communication problem which can only be handled using comment so that I could become able to transfer my logical data structure efficiently to other my programming fellows. I google to search out how to comment in JSON, but the answer that I found was "You can comment in JSON". So why did JSON developers not add method to comment in JSON so other developer can perceive the data correctly? I posted this same question to stack-overlflow, hope I will get desired well-perceived answer.
Posted
Comments
Sergey Alexandrovich Kryukov 16-Apr-15 3:19am    
Ask those developers... I'm afraid some out expert will describe some reasons, but I would not trust such explanations.
"You can comment" is not true. There are not real comments, or those comments are supposed to be removed in some post-processing...
—SA

Comments are not part of the official JSON standard.

http://json.org/[^]
 
Share this answer
 
Please see my comment to the question, which is also not a JSON comment. :-)
No, "you can comment" is not true: you can easily find it out:
http://json.org,
http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf.

When people comment JSON, they either use some actual data for commenting, or they actually use regular JavaScript comments (or any other form of comments) and call it JSON, but this is not real JSON. Such comments could be used on temporary basis, filtering them out before feeding "real" JSON to algorithm compliant with this standard. In other word, using some tricks which are never real JSON comments, which don't exist.

Why so? Please see my comment to the question again. :-)

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900