Repaso
EspaƱol
Backend & APIsCoreAPI-37

What is JSON?

Options

  1. A JavaScript framework that is used for building web apps
  2. A lightweight text format for data, with {} objects and [] arrays (Correct option)
  3. A database engine that stores documents as binary files
  4. A binary image format that is commonly used on the web

Answer

A lightweight text format for data, with objects {} and arrays []

Why

JSON (JavaScript Object Notation) is plain text that both humans and programs read easily: {"name": "Ana", "skills": ["python", "sql"]}.

It is the most common format for API requests and responses.

In Python, json.dumps(obj) turns a dict into JSON text and json.loads(text) does the reverse.

Remember

JSON = the text format APIs speak.

Key terms

Practice this question in Repaso