“JSON -Kommentar” Code-Antworten

Wie man Kommentare in der JSON -Datei

{
	"_comment": "comment text goes here...",
    "name": "your-app-name",
    ...
}
MrStonkus

Können Kommentare in JSON verwendet werden?

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",
   }
}
Beautiful Buzzard

JSON -Kommentar

{
   "_comment": "comment text goes here...",
   "glossary": {
      "title": "example glossary",
      "GlossDiv": {
         "title": "S",
         "GlossList": {
            "GlossEntry": {
               "ID": "SGML",
               "SortAs": "SGML",
               "GlossTerm": "Standard Generalized Markup Language",
               "Acronym": "SGML",
               "Abbrev": "ISO 8879:1986",
               "GlossDef": {
                  "para": "A meta-markup language, used to create markup languages such as DocBook.",
                  "GlossSeeAlso": ["GML", "XML"]
               },
               "GlossSee": "markup"
            }
         }
      }
   }
}

Ähnliche Antworten wie “JSON -Kommentar”

Fragen ähnlich wie “JSON -Kommentar”

Weitere verwandte Antworten zu “JSON -Kommentar” auf JavaScript

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen