What Is JSON? Plain-English Definition and Examples
What is JSON? A plain-English definition with a small example, the syntax rules, common errors and fixes, and how to read, validate, format and repair it.
Have broken JSON right now? Fix it free in under 1 second — no signup.
Fix My JSON →JSON (JavaScript Object Notation) is a text format for structured data. It stores values as objects, arrays, strings, numbers, booleans and null. Programs use it to exchange data, and people can read it. The standard is RFC 8259. Almost every language has a library to parse and write it.
Written by The JSON Medic.
JSON in one paragraph
JSON stands for JavaScript Object Notation. It is a lightweight, text-based format for representing structured data. It grew out of JavaScript object syntax, but it is language independent. RFC 8259 is the standard that defines it. APIs, config files and message queues use JSON because it is simple to write, easy to read and easy to parse.
What JSON looks like: a small example
Here is a small object with a string, a number, a boolean, a null and an array.
{
"name": "Ada",
"age": 36,
"active": true,
"manager": null,
"skills": ["math", "code"]
}
Reading it line by line: the outer braces wrap one object. "name" holds the string "Ada". "age" holds the number 36. "active" holds the boolean true. "manager" holds null, meaning no value. "skills" holds an array of two strings in square brackets. Each name is separated from its value by a colon. Members are separated by commas, except after the last one.
The JSON value types and syntax rules
A JSON value is one of seven things: an object, an array, a string, a number, true, false or null. An object is a set of name/value pairs in braces. An array is an ordered list of values in square brackets. The literals true, false and null are lowercase only.
The syntax rules are strict. Strings and object names must use double quotes. Single quotes are not allowed. Comments are not part of the format. A trailing comma after the last item in an object or array is invalid. Numbers are decimal, with no leading plus sign and no NaN or Infinity.
Is a JSON file just a text file?
Yes. A JSON file is plain text. RFC 8259 requires JSON exchanged between systems to be encoded as UTF-8. The usual file extension is .json, and the registered media type is application/json. Nothing binary is involved, so any tool that handles text can handle it.
How to read a .json file
To read a .json file, follow these steps. First, open it in any text editor, such as VS Code, Notepad or vim. Second, if the file is one long line, copy the contents and paste them into a formatter to get indentation. Third, check the structure: braces open objects, brackets open arrays.
The site formatter at /format pretty prints JSON with configurable indentation. If you suspect the file is broken, paste it into the validator at /validate.
Is JSON the same as SQL?
No. JSON is a data format. It describes how to write data as text. SQL is a query language for relational databases. You use it to select, insert and update rows in tables. They can work together. Many databases store JSON in a column, and many SQL queries return rows that an application then serializes to JSON.
What is a JSON validator?
A JSON validator checks whether text is valid JSON according to the syntax rules. It either accepts the text or reports what is wrong. The site validator at /validate detects errors and reports exact line and column numbers, so you can jump to the problem.
What is a JSON formatter?
A JSON formatter rewrites JSON with consistent whitespace. Pretty printing adds line breaks and indentation so people can read it. Minifying removes the whitespace to make the text smaller. Whitespace between tokens does not change meaning, so both forms parse to the same data.
The site has a formatter at /format for pretty printing and a minifier at /minify for compressing.
What is a JSON error and how to fix it
A JSON error is usually a parse error. The parser reads the text, hits something the grammar does not allow, and stops. The message normally names the unexpected character and its position.
Common causes: a trailing comma, single quotes instead of double quotes, unquoted keys, comments, and truncated text where a closing brace or bracket is missing.
{
'name': "Ada",
age: 36, // years
}
This snippet has single quotes, an unquoted key, a comment and a trailing comma.
To fix an error by hand: paste the text into the validator, go to the reported line and column, and fix that spot. Then validate again, because a parser stops at the first problem. Replace single quotes with double quotes, quote the keys, delete comments, remove trailing commas, and close any open braces or brackets.
What is JSON repair and what does it do?
JSON repair is automated fixing of invalid JSON. Instead of editing each error yourself, a tool reads the broken text and returns valid JSON. The site repair tool at /json-repair fixes broken JSON such as syntax errors, missing quotes and trailing commas. It is free and needs no signup.
Repair is a guess about what the author meant. Review the output before you rely on it, especially for truncated text.
JSON error on Hulu
A JSON error in a streaming app such as Hulu is usually a service or app problem. The app received a bad response from the server. It is not something you fix with a JSON tool, because you do not control the data.
Try generic steps: restart the app, check your network, update the app, clear its cache or reinstall it, try another device, and check the service status page. If it persists, contact support.
Key takeaways
- JSON is a plain-text data format defined by RFC 8259.
- It has seven value types: object, array, string, number, true, false, null.
- Strings and names use double quotes. No comments, no trailing commas.
- A JSON file is a text file; any editor opens it.
- Most JSON errors come from trailing commas, single quotes, unquoted keys, comments or truncated text.
FAQ
How to fix JSON error?
Paste the text into the validator, go to the reported line and column, and fix that spot. Typical fixes: remove trailing commas, use double quotes, quote keys, delete comments, close open brackets. Validate again.
How can I read a .JSON file?
Open it in any text editor. For minified one-line files, paste the contents into a formatter to get indentation, such as the site formatter at /format.
Is JSON the same as SQL?
No. JSON is a data format. SQL is a query language for relational databases. They can be used together, for example when a database stores JSON in a column.
Is a JSON file just a text file?
Yes. It is plain text, UTF-8 per RFC 8259, usually with a .json extension and the media type application/json.
What is a JSON validator?
A tool that checks whether text is valid JSON. The site validator at /validate reports errors with exact line and column numbers.
What is JSON repair?
Automated fixing of invalid JSON. You give a repair tool broken text and it returns valid JSON. The site tool is at /json-repair.
What does JSON repair do?
It fixes syntax problems such as missing quotes and trailing commas so the result parses. Review the output, since repair infers what the author meant.
What is a JSON error?
Usually a parse error: the parser met text the JSON grammar does not allow, such as a trailing comma, single quotes or truncated input, and stopped.
Still dealing with broken JSON?
Paste it in and get it fixed in under 1 second — free, no signup, no install. Works with ChatGPT, Claude, n8n, and any AI output.
Fix My JSON Free →Related Articles