What is JSON?
JSON (JavaScript Object Notation) is a text format for storing and exchanging data. Despite the name, it works with any language, not just JavaScript.
JSON looks like this:
{
"name": "Alice",
"age": 30,
"active": true
}
It supports a few basic types: strings, numbers, booleans, null, arrays, and objects. That simplicity is its strength - every language can read and write it.
JSON is everywhere:
- Web APIs send and receive JSON
- Configuration files use JSON
- Databases store JSON documents
Python's json module handles conversion between JSON text and Python objects. Dictionaries become JSON objects, lists become arrays.
I cover JSON fundamentals in my JSON with Python course.