JSON (JavaScript Object Notation)
Last Updated: July 29, 2026 | By Mihail Sebastian | AI Dictionary
A text format that represents structured data as key-value pairs and arrays – the standard way APIs, datasets, and ML tools exchange information.
What is JSON (JavaScript Object Notation)?
JSON (JavaScript Object Notation) is a text format that represents structured data as key-value pairs, arrays, and nested objects, readable by both people and programs. It is the default format for exchanging data between systems.
The name comes from JavaScript, where the syntax originated, but JSON is language-independent: every major language parses it. In machine learning work, it carries API requests and responses, dataset annotations, and experiment logs.
How JSON Works
A JSON document builds everything from a few pieces: objects in curly braces, arrays in square brackets, and values that are strings, numbers, booleans, or null. Keys are always quoted strings.
{"image": "cat_042.jpg", "label": "cat", "confidence": 0.97}
That one line could be a dataset annotation or a model’s prediction response. The strict syntax is the point: parsers reject malformed documents instead of guessing, so two systems never disagree about what the data says.
JSON vs YAML
JSON is built for programs exchanging data; YAML is built for humans editing configuration files. JSON’s strict, bracket-heavy syntax makes it trivial for machines to generate and parse. YAML trades that strictness for readability: indentation instead of brackets, plus support for comments.
The two are related. YAML 1.2 is designed as a superset of JSON, so any valid JSON document is also valid YAML.
| Criterion | JSON | YAML |
|---|---|---|
| Primary use | Data exchange between programs (APIs, logs, annotations) | Configuration files edited by hand |
| Syntax | Braces, brackets, quoted keys | Indentation, minimal punctuation |
| Comments | Not supported | Supported with # |
Example of JSON
The COCO dataset, a standard benchmark for object detection, ships its annotations as JSON: one large file listing every image, every labeled object, and the coordinates of each bounding box. A training pipeline reads that file, matches annotations to images, and feeds both to the model.
The same format appears at the other end of the ML lifecycle. When you deploy a model behind an API, clients send inputs as JSON and receive predictions as JSON, like the confidence score above.
Related AI terms: YAML · Webhook · Pipeline · Object Detection
Did you like the JSON (JavaScript Object Notation) gist?
Learn about 250+ need-to-know artificial intelligence terms in the AI Dictionary.
Mihail Sebastian — Writes about AI governance, regulation, and the technology behind them. Placeholder bio — replace with a real credential line. About