In JavaScript, names in object literals need not be surrounded by quotation marks, unless they are illegal JavaScript names (for example, they contain a special character, for example, a dash, they are a reserved word, etc.).
In the JSON data interchange format, all names must be surrounded by double quotation marks.
source share