Question #716   Submitted by Answiki on 10/22/2021 at 07:11:01 AM UTC

Can comments be used in JSON?

Answer   Submitted by Answiki on 10/22/2021 at 07:22:29 AM UTC

JSON does not support comments. Comments have to be data.


The JSON is data only, the format does not support comments. If you have to include comments, it will be data too as in the following example:

{
  { "firstname": "Kevin",
    "lastname": "Smith" },

  { "firstname": "Bob",
    "lastname": "Walker" },

  { "comment" : "This is a list of volonters" },
}

6 events in history
Question by Answiki 10/22/2021 at 07:23:34 AM
Does JSON support comments ?
Question by Answiki 10/22/2021 at 07:22:52 AM
What is the syntax of comments in JSON?
Answer by Answiki on 10/22/2021 at 07:22:29 AM

JSON does not support comments. Comments have to be data.


The JSON is data only, the format does not support comments. If you have to include comments, it will be data too as in the following example:

{
  { "firstname": "Kevin",
    "lastname": "Smith" },

  { "firstname": "Bob",
    "lastname": "Walker" },

  { "comment" : "This is a list of volonters" },
}

Answer by Answiki on 10/22/2021 at 07:21:34 AM

JSON does not support comments. Comments have to be data.


The JSON is data only, the format does not support comments. If you have to include a comment, it will be data too as in the following example:

{
  { "firstname": "Kevin",
    "lastname": "Smith" },

  { "firstname": "Bob",
    "lastname": "Walker" },

  { "comment" : "This is a list of volonters" },
}

Question by Answiki 10/22/2021 at 07:11:12 AM
How to add comments in JSON?
Question by Answiki 10/22/2021 at 07:11:01 AM
Can comments be used in JSON?
# ID Query URL Count
0 2822 Donnée moi la différence entre fichier et répertoire https://en.ans.wiki/716/can-comments-be-used-in-json 1

Icons proudly provided by Friconix.