Introduction
JSON (JavaScript Object Notation) is a standardized format for structuring data. It is heavily based on the syntax for JavaScript objects. You will often encounter JSON formatted data when working with external servers or APIs - it is essentially the universal format for transmitting data on the web.
Fortunately, there isn’t much to learn here. We’re only including a lesson on it because some formatting rules can cause confusion if you aren’t aware of them. Spend 10-15 minutes going through the following resources and you’ll be good to go.
Lesson overview
This section contains a general overview of topics that you will learn in this lesson.
- Learn what JSON is.
- Understand how to read and write JSON formatted data.
Assignment
- This JSON MDN tutorial is probably all you need…
- Read about the 2 JavaScript methods that you’ll most often be using when dealing with JSON - JSON.parse() and JSON.stringify().
- Mis-formatted JSON is a common cause of errors. This JSON formatter website lets you paste in JSON code and will search it for formatting errors.
Knowledge check
The following questions are an opportunity to reflect on key topics in this lesson. If you can’t answer a question, click on it to review the material, but keep in mind you are not expected to memorize or master this knowledge.
Additional resources
This section contains helpful links to related content. It isn’t required, so consider it supplemental.
- It looks like this lesson doesn’t have any additional resources yet. Help us expand this section by contributing to our curriculum.