bjects/Object/__defineSetter__) Deprecated 
    3. [ ` Object.prototype.__lookupGetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__lookupGetter__) Deprecated 
    4. [ ` Object.prototype.__lookupSetter__() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/__lookupSetter__) Deprecated 
    5. [ ` Object.prototype.hasOwnProperty() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty)
    6. [ ` Object.prototype.isPrototypeOf() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/isPrototypeOf)
    7. [ ` Object.prototype.propertyIsEnumerable() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/propertyIsEnumerable)
    8. [ ` Object.prototype.toLocaleString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toLocaleString)
    9. [ ` Object.prototype.toString() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/toString)
    10. [ ` Object.prototype.valueOf() ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/valueOf)

##  In this article

  * Description 
  * Static properties 
  * Static methods 
  * Examples 
  * Specifications 
  * Browser compatibility 
  * See also 

#  JSON

The **` JSON ` ** namespace object contains static methods for parsing values
from and converting values to [ JavaScript Object Notation
](https://json.org/) ( [ JSON ](/en-US/docs/Glossary/JSON) ).

##  Description

Unlike most global objects, ` JSON ` is not a constructor. You cannot use it
with the [ ` new ` operator ](/en-
US/docs/Web/JavaScript/Reference/Operators/new) or invoke the ` JSON ` object
as a function. All properties and methods of ` JSON ` are static (just like
the [ ` Math ` ](/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math)
object).

###  JavaScript and JSON differences

JSON is a syntax for serializing objects, arrays, numbers, strings, booleans,
and [ ` null ` ](/en-US/docs/Web/JavaScript/Reference/Operators/null) . It is
based upon JavaScript syntax, but is distinct from JavaScript: most of
JavaScript is _not_ JSON. For example:

Objects and Arrays

    

Property names must be double-quoted strings; [ trailing commas ](/en-
US/docs/Web/JavaScript/Reference/Trailing_commas) are forbidden.

Numbers

    

Leading zeros are prohibited. A decimal point must be followed by at least one
digit. ` NaN ` and ` Infinity ` are unsupported.

Any JSON text is a valid JavaScript expression, but only after the [ JSON
superset ](https://github.com/tc39/proposal-json-superset) revision. Before
the revision, U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR are allowed
in string literals and property keys in JSON; but the same use in JavaScript
string literals is a [ ` SyntaxError ` ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError) .

Other differences include allowing only double-quoted strings and no support
for [ ` undefined ` ](/en-
US/docs/Web/JavaScript/Reference/Global_Objects/undefined) or comments. For
those who wish to use a more human-friendly configuration format based on
JSON, there is [ JSON5 ](https://json5.org/) , used by the Babel compiler, and
the more commonly used [ YAML ](https://en.wikipedia.org/wiki/YAML) .

The same text may represent different values in JavaScript object literals vs.
JSON as well. For more information, see [ Object literal syntax vs. JSON
](/en-
US/docs/Web/JavaScript/Reference/Operators/Object_initializer#object_literal_syntax_vs._json)
.

###  Full JSON grammar

Valid JSON syntax is formally defined by the following grammar, expressed in [
ABNF ](https://en.wikipedia.org/wiki/Augmented_Backus%E2%80%93Naur_form) , and
copied from [ IETF JSON standard (RFC)
](https://datatracker.ietf.org/doc/html/rfc8259) :

    
    
    JSON-text = object / array
    begin-array     = ws %x5B ws  ; [ left square bracket
    begin-object    = ws %x7B ws  ; { left curly bracket
    end-array       = ws %x5D ws  ; ] right square bracket
    end-object      = ws %x7D ws  ;