[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/JSON [Back]  [Original]

JSON - JavaScript | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

JSON

Baseline Widely available *

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2015 7.

* Some parts of this feature may have varying levels of support.

JSON JavaScript Object Notation(JSON) JSON . JSON , .

In this article

JavaScript JSON

JSON , , , , null , JavaScript . , JavaScript JSON .

. .

0 . . NaN Infinity .

JSON JavaScript ...

..., JSON ECMA-262 JavaScript . , U+2028 LINE SEPARATOR U+2029 PARAGRAPH SEPARATOR JSON , JavaScript SyntaxError .

JSON.parse() JSON eval JavaScript .

js
const code = '"\u2028\u2029"';
JSON.parse(code); //   "\u2028\u2029" 
eval(code); //   SyntaxError

, undefined . JSON , Babel JSON5 , YAML .

JSON

js
    JSON = null
        or true or false
        or JSONNumber
        or JSONString
        or JSONObject
        or JSONArray

    JSONNumber = - PositiveNumber
              or PositiveNumber
    PositiveNumber = DecimalNumber
                  or DecimalNumber . Digits
                  or DecimalNumber . Digits ExponentPart
                  or DecimalNumber ExponentPart
    DecimalNumber = 0
                 or OneToNine Digits
    ExponentPart = e Exponent
                or E Exponent
    Exponent = Digits
            or + Digits
            or - Digits
    Digits = Digit
          or Digits Digit
    Digit = 0 through 9
    OneToNine = 1 through 9

    JSONString = ""
              or " StringCharacters "
    StringCharacters = StringCharacter
                    or StringCharacters StringCharacter
    StringCharacter = any character
                      except " or \ or U+0000 through U+001F
                   or EscapeSequence
    EscapeSequence = \" or \/ or \\ or \b or \f or \n or \r or \t
                  or \u HexDigit HexDigit HexDigit HexDigit
    HexDigit = 0 through 9
            or A through F
            or a through f

    JSONObject = { }
              or { Members }
    Members = JSONString : JSON
           or Members , JSONString : JSON

    JSONArray = [ ]
             or [ ArrayElements ]
    ArrayElements = JSON
                 or ArrayElements , JSON

JSONNumber( ) JSONString( ) . (U+0009), (U+000D), (U+000A) (U+0020) .

JSON.parse()

JSON , .

JSON.stringify()

JSON . .

Specification
ECMAScript 2027 LanguageSpecification
# sec-json-object


Web Proxy Viewer  |  New URL  |  Original Page