Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Can comments be used in JSON?

No.
The JSON is data only, and if you include a comment, then it will be data too.
You could have a designated data element called "_comment" (or something) 
that should be ignored by apps that use the JSON data.
But if you decided to:
{
   "_comment": "comment text goes here...",
   "grocery": {
      "title": "Some title",
   }
}
Source by thecodeteacher.com #
 
PREVIOUS NEXT
Tagged: #Can #comments
ADD COMMENT
Topic
Name
9+2 =