0

Maybe this is a trivial question.

I am looking into a JSON file I found something like this:

{
    localization_id: 2,
    local_user_id: 33,
    is_active: true,
    registration_date: 2017-09-13 12:05:21
}

When looking into another JSON file otherwise I found something like this:

{
    "cod": "200",
    "message": 0.0036,
    "cnt": 40,
}

Why in the second one the field name and some value are into the ""? Is it irrelevant or have a meaning?

Zissouu
  • 924
  • 2
  • 10
  • 17
AndreaNobili
  • 40,955
  • 107
  • 324
  • 596
  • More https://stackoverflow.com/questions/4201441/is-there-any-practical-reason-to-use-quoted-strings-for-json-keys – mplungjan Sep 18 '17 at 12:35
  • More https://stackoverflow.com/questions/18635132/json-object-with-or-without-quotes – mplungjan Sep 18 '17 at 12:35
  • More https://stackoverflow.com/questions/2067974/in-json-why-is-each-name-quoted – mplungjan Sep 18 '17 at 12:36
  • 1
    maybe you have a look into the standard: [ECMA 404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf) or at [json.org](http://json.org/) – Nina Scholz Sep 18 '17 at 12:36
  • 1
    First example is javscript object representation and not valid JSON and the 2nd example is valid JSON. – Eftakhar Sep 18 '17 at 12:36

0 Answers0