Exercise Solutions: JSONΒΆ

  1. Which of the following three code snippets is correct JSON syntax? Why?

    1. This not correct JSON syntax because keys in JSON need to be strings.

    2. This is the only correct option.

    3. This not correct JSON syntax because, unlike JavaScript, JSON only uses double quotation marks ("").

    Back to the exercises