JavaScript Fundamentals · Working with JSON · Lesson 34 of 48
What is JSON?
Concept
What is JSON?
JSON (JavaScript Object Notation) is a lightweight, text-based format for representing data. It's the standard way APIs send and receive structured data on the web.
Despite the name, JSON is language-independent — nearly every programming language has a library for reading and writing it, which is exactly why it became the universal format for web APIs.
- Explain the core idea behind What is JSON?.
- Predict output before running a change.
- Test one realistic and one unusual input.
- Use the result to make the next decision.
- 1. Read one concept.
- 2. Change the example.
- 3. Run, compare, and explain.
- 4. Complete the challenge below.
{
"key": "value",
"number": 42,
"array": [1, 2, 3]
}{
"name": "Alex",
"address": {
"city": "Tashkent"
}
}Self-check before continuing
Without looking at the example, describe what changes when you modify one input in What is JSON?. Then reopen the editor and prove your explanation with a small test.
You are ready to continue when you can predict, test, and explain the result.
Your turn
Write a small JSON object describing a course, with title, level, and totalLessons fields.
Console