Web developmentLesson 2 of 3 in the course JavaScript and the browser

JSON: Data Model, Syntax, Standards, Interoperability, and Applications

5 flashcards · 5 quiz questions · 5 match pairs · 5 fill-in sentences · English

Lesson progress
0 / 5

Your progress is kept in this browser only.Sign up to save it

Summary

JSON is a widely used format for representing and exchanging structured data. This lesson introduces what JSON is, how its basic structures work, and which data types it supports.

JSON stands for JavaScript Object Notation. It is an open, text-based standard for storing and transmitting data. Its readable structure makes it practical for people to inspect, while its predictable rules make it straightforward for software to generate and parse.

All flashcards

What is JSON?
JSON (JavaScript Object Notation) is a readable, text-based standard for representing and exchanging structured data.
What is a JSON object?
A collection of name–value pairs enclosed in curly braces. Each key is a string, and a colon separates the key from its value.
What is a JSON array?
An ordered list of zero or more JSON values, enclosed in square brackets and separated by commas.
Which six basic data types does JSON support?
String, number, Boolean, array, object, and null.
Is JSON limited to JavaScript programs?
No. Its syntax originated from JavaScript, but JSON is language-independent and can be generated and parsed by many programming languages.

Quiz questions

  1. Which statement about comments in standard JSON is correct?Answer: Standard JSON has no syntax for comments.
  2. Why should untrusted JSON text be parsed rather than passed to JavaScript's eval()?Answer: Parsing treats the input as data, while eval() can execute it as code.
  3. What is a primary purpose of JSON Schema?Answer: To describe and validate the expected structure of JSON data.
  4. Which statement describes a complete JSON text under current JSON rules?Answer: It can contain any single serialized JSON value.
  5. How do ECMA-404 and RFC 8259 differ in emphasis?Answer: ECMA-404 describes JSON syntax; RFC 8259 also addresses Internet security and interoperability.

Based on the Wikipedia article JSON, licensed CC BY-SA 4.0. Adapted into a summary, flashcards and quizzes.

All Web development lessons