Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
What is JSON
3. What does a JSON file look like?
Summary

Instruction

Great! An example JSON file looks like this:

{
  "first_name": "Guido",
  "last_name": "van Rossum",
  "titles": ["BDFL", "Developer"], 
  "age": 63,
  "married": true
}

The file contains a collection of name-value pairs, separated by a comma.

The first pair is "first_name": "Guido". In this pair, first_name is the name and Guido is the value. After a comma, we have the next name-value pair, and so on.

Look at the third pair: "titles": ["BDFL", "Developer"]. This is also a name-value pair: titles is the name and the array ["BDFL", "Developer"] is the value. This is a key difference between the JSON and CSV formats: CSV is a flat format; it does not support nested objects.

Notice that in JSON, all the field names (e.g., first_name) are in double quotes (").

Exercise

True or False: Answer by assigning True or False to the variable below the given statement.