If you have ever opened a settings file, copied an error message, or wondered what an app sends to its server, you have probably met JSON. It is the plain-text format behind most of the modern web, and reading it is easier than it looks.
What JSON actually is
JSON stands for JavaScript Object Notation. Despite the name, it is not JavaScript and it is not code. It is simply a way of writing structured data as text, using two familiar ideas: named values, like a label next to a value, and ordered lists. Because it is plain text, you can open it in any text editor, email it, paste it into a document, and read it without special software. Because it follows strict rules, programs can parse it reliably, which is why it became the standard format for data moving between apps and servers.
A useful mental model is a labeled filing cabinet. Each drawer has a label and holds something: a word, a number, a true-or-false value, another cabinet, or a list of cabinets. That is all JSON ever is. There are no hidden tricks, no formatting commands, and no executable instructions. If you can read a labeled list, you can read JSON.
The only six kinds of values
Every value in JSON is one of six kinds. Strings are text in double quotes, such as "Ada Lovelace". Numbers are written plainly, such as 42 or 19.99, with no currency symbols or commas. Booleans are exactly true or false, in lowercase. Null means deliberately empty, as in a middle name that does not exist. Objects group named values inside curly braces. Arrays hold ordered values inside square brackets. Once you recognize those six, every JSON document is just combinations of them.
One detail trips up beginners: JSON requires double quotes around strings and around object keys. Single quotes are not valid JSON, even though many programming languages accept them.
Objects versus arrays: the one distinction that matters
Objects and arrays answer different questions. An object answers "what is this thing?" by pairing names with values: a person object might pair "name" with "Ada", "age" with 36, and "city" with "London". The order of pairs does not matter, and you find a value by its name. An array answers "what is in this list, in order?" by holding values in sequence: a list of scores might be [88, 92, 79], where position matters and the first item is at index zero in most programming languages.
Real documents mix the two freely: a weather response might be an object containing an array of daily forecasts, each itself an object with a date and a condition. Reading from the outside in keeps even a deeply nested document manageable.
Reading a JSON blob, step by step
Consider this small example of a book order:
- The outer curly braces say the whole thing is one object.
- Inside it, "orderId" pairs with the string "A-1042", and "total" pairs with the number 34.98.
- "items" pairs with an array, because its value starts with a square bracket.
- Each item in that array is an object with its own "title", "price", and "quantity" pairs.
- "shipped" pairs with the boolean false, meaning the order has not shipped yet.
Reading it aloud helps: "An order, number A-1042, totaling 34.98, with two items, not yet shipped." That sentence is the whole document, restated. When a blob looks intimidating, cover everything except the outer layer, name what each key holds, then drill into one nested piece at a time. A formatter that indents each level and collapses sections makes this dramatically easier, which is why developers paste blobs into formatters constantly.
A worked example: what an API actually sends back
Suppose a weather app asks a server for the forecast in Boise. The server replies with JSON roughly like this in structure: an object with a city name, a current temperature, and a forecast array holding three day-objects, each with a day name, a high, a low, and a condition such as "sunny". The app does not display the raw text. It parses the JSON, pulls out the city, the temperature, and each forecast day by name, and renders them as the cards you see on screen.
That pipeline explains why APIs love JSON. The server writes data once, in a format every language understands, and each client reads the same response and displays it differently. JSON separates the data from the display, so the data stays clean and reusable.
Common errors and how to fix them
Most JSON errors come from four mistakes. A trailing comma after the last item in an object or array is invalid, so delete it. Single quotes around strings are invalid, so switch them to double quotes. Unquoted keys are invalid, so quote every key. A missing closing brace or bracket breaks the whole document, so check that every opening brace has a matching closing brace at the same nesting level. When a parser reports an error, it usually names a line or character position: look there first, then check the item just before it, since a missing comma often shows up as an error on the following line.
Where you will see JSON in everyday life
JSON hides in places non-developers touch more often than they realize. Many app settings and configuration files are JSON. Exported data from tools, dashboards, and form builders often downloads as a JSON file. Browser extensions, automation tools, and spreadsheet imports accept JSON as an interchange format. Even AI chatbots and voice assistants exchange structured results as JSON behind the scenes. Recognizing the format turns an intimidating blob into something you can open, skim, and even edit by hand for small changes, such as updating a name or a number in a settings file.
Frequently asked questions
Is JSON a programming language?
No. JSON is a text format for storing and exchanging data, not a language that runs code. Nearly every programming language can read and write it, which is why it works as a common format between different systems. Think of it as a shared filing format, not a program.
What is the difference between JSON and XML?
Both store structured data as text, but JSON is usually shorter and easier to read, while XML uses opening and closing tags and supports attributes. JSON won most web work because it maps directly onto the data structures programs already use. XML still appears in older enterprise systems and document formats.
Why does my JSON fail with a trailing comma error?
JSON does not allow a comma after the last item in an object or array, even though many programming languages do. Remove that final comma and the file will usually parse. A formatter that highlights the error location makes this a ten-second fix.
Can JSON store dates, comments, or functions?
Not directly. JSON has no date type, no comments, and no functions. Dates are stored as strings, usually in year-month-day format, and programs convert them back into dates after reading. If you need comments, keep them outside the JSON file or in a separate document.