{"post":{"slug":"what-is-json-2026","title":"What is JSON in 2026? The data format of the web","excerpt":"JSON is a lightweight text format for storing and sending structured data. It is what most APIs use. Here is its syntax, why it won, and where it falls short.","category":"code","date":"June 18, 2026","author":"ByteLedger Team","content":"<span class=\"dropcap\">J</span>SON, short for JavaScript Object Notation, is a lightweight text format for storing and sending structured data. It represents data as key-value pairs, lists, and nested objects in a way that is easy for both people to read and machines to parse. It is the format most web APIs use to exchange information, which is why nearly every developer reads and writes it daily. Despite the name, it is not tied to JavaScript; every common language can parse it. This explainer covers the syntax, why it became the standard, a quick example, and where it is the wrong tool.\n\n## What JSON looks like\n\nJSON is built from a few simple pieces: objects wrapped in curly braces holding key-value pairs, arrays wrapped in square brackets holding lists, and values that are strings, numbers, booleans, null, or more objects and arrays. Keys are always quoted strings.\n\n```\n// a small JSON object\n{\n  \"name\": \"Ada\",\n  \"active\": true,\n  \"roles\": [\"admin\", \"editor\"],\n  \"profile\": { \"city\": \"Lisbon\" }\n}\n```\n\nThat is essentially the whole language. There are no functions, no comments, and no fancy types. The simplicity is the point: it is small enough to learn in minutes and predictable enough to parse anywhere.\n\n## Why JSON won\n\n| Factor | JSON | XML |\n| --- | --- | --- |\n| Readability | High, minimal syntax | Verbose, many tags |\n| Size | Compact | Larger |\n| Parsing | Built into most languages | Heavier tooling |\n| Comments | Not supported | Supported |\n| Best for | APIs, config, data exchange | Documents, legacy systems |\n\nJSON displaced XML for most web data because it is lighter, easier to read, and maps cleanly onto the data structures programmers already use. It is the standard payload for [REST APIs](/blog/what-is-a-rest-api-2026) and is just as common in [GraphQL responses](/blog/what-is-graphql-2026).\n\n## A concrete use\n\nWhen a weather app shows the forecast, it usually calls an API that returns JSON: an object with the temperature, a condition string, and an array of upcoming days. The app parses that JSON into native objects and renders the screen. The same format carries configuration files, log entries, and messages between services. Its flexibility across all these uses is why it is everywhere.\n\n## How to work with it\n\n1. **Learn the six value types.** String, number, boolean, null, object, array; that is all there is.\n2. **Quote your keys.** Every key is a double-quoted string, and trailing commas are not allowed.\n3. **Use your language parser.** Do not parse JSON by hand; every language has a built-in parser.\n4. **Validate untrusted JSON.** Check shape before trusting data from an external source.\n5. **Format it for humans when debugging.** Pretty-printing makes nested data readable.\n\n## What to skip\n\n- **Do not put comments in JSON.** The format does not allow them; use a different format for commented config.\n- **Do not use JSON for huge datasets.** For very large or streaming data, formats built for that scale better.\n- **Do not hand-edit deeply nested JSON.** A missing brace breaks the whole file; use tooling.\n- **Do not assume key order matters.** Object key order is not guaranteed to be meaningful.\n\n## FAQ\n\n**Is JSON a programming language?**\nNo. JSON is a data format for storing and transmitting structured data. It has no logic or behavior; it only describes data.\n\n**What is the difference between JSON and XML?**\nBoth store structured data, but JSON is lighter, less verbose, and easier to parse, while XML supports comments and richer document features. JSON dominates web APIs; XML lingers in documents and legacy systems.\n\n**Can JSON have comments?**\nNo. Standard JSON does not allow comments. If you need commented configuration, a format like YAML or a JSON variant that permits comments is a better fit.\n\n**Is JSON only for JavaScript?**\nNo. It originated from JavaScript syntax but is language independent. Every common programming language has a parser for reading and writing JSON.\n\n## Where to go next\n\n[See how APIs deliver JSON in what a REST API is](/blog/what-is-a-rest-api-2026), [explore a flexible query layer in what GraphQL is](/blog/what-is-graphql-2026), and [understand the databases that often store it in what NoSQL is](/blog/what-is-nosql-2026).","hue":45,"metaTitle":"What Is JSON in 2026? The Data Format of the Web","metaDescription":"What is JSON in 2026? A plain explainer of the data format behind most APIs, its simple syntax, why it became the standard, and where it is the wrong tool.","keywords":["what is json 2026","json explained","json meaning","json syntax","json vs xml","json data format","json for apis","json example","parse json","json keys and values"],"tldr":["**JSON stores structured data as text** — key-value pairs, arrays, and nested objects in a format both people and machines can read.","**It is the default for web APIs** — most services send and receive JSON, so nearly every developer reads and writes it daily.","**The syntax is tiny** — objects, arrays, strings, numbers, booleans, and null cover everything, with no comments allowed.","**It is language independent** — JSON came from JavaScript but parsers exist for every common language.","**Skip:** using JSON for huge datasets or config that needs comments; other formats handle those cases better."],"readTime":"3 min read","wordCount":700},"related":[{"slug":"what-is-a-binary-tree-2026","title":"What is a binary tree in 2026? The data structure explained","excerpt":"A binary tree is a structure where each node has at most two children. Here is what that means, how it works, and why it shows up everywhere in software.","category":"code","date":"May 25, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":195},{"slug":"what-is-a-stack-2026","title":"What Is a Stack in 2026? Plain-English Programming Guide","excerpt":"A clear explanation of what a stack is in programming in 2026, how the last-in-first-out rule works, where stacks show up, and how they differ from a queue.","category":"code","date":"June 23, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":205},{"slug":"what-is-a-string-in-programming-2026","title":"What Is a String in Programming in 2026? Plain Guide","excerpt":"A clear explanation of what a string is in programming in 2026, how text is stored, what you can do with strings, and the mistakes beginners make.","category":"code","date":"June 18, 2026","author":"ByteLedger Team","readTime":"4 min read","hue":212}],"sameCategory":[{"slug":"bazel-build-explained-2026","title":"Bazel Explained: What Hermetic Builds Actually Cost","excerpt":"Bazel delivers reproducible, precisely cached builds and demands that you describe everything. Here is what you get, what it costs, and who should say no.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":145},{"slug":"graphql-federation-2026","title":"GraphQL Federation: One Graph, Many Teams","excerpt":"Federation composes independently-owned subgraphs into a single API. Here is what it solves, the operational cost it adds, and when a simpler gateway is enough.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":300},{"slug":"hermetic-builds-explained-2026","title":"Hermetic Builds Explained: Same Inputs, Same Output","excerpt":"A hermetic build depends only on declared inputs. Here is what that property gives you, the common leaks that break it, and how to move toward it incrementally.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":130},{"slug":"monorepo-tooling-compared-2026","title":"Monorepo Tooling Compared: What You Actually Need","excerpt":"Monorepo tools solve task orchestration and caching, not repository layout. Here is what each tier provides and how to tell when you have outgrown the simple option.","category":"code","date":"August 19, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":150}],"newer":{"slug":"what-is-inheritance-2026","title":"What is inheritance in 2026? Building new code on existing types","excerpt":"Inheritance lets one type reuse and extend the data and behavior of another. This guide explains how it works, the difference from composition, and why modern advice says to use it sparingly.","category":"code","date":"June 18, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":320},"older":{"slug":"what-is-lifestyle-inflation-2026","title":"What is lifestyle inflation in 2026: the quiet raise killer","excerpt":"A plain-language explainer on lifestyle inflation in 2026 — what it is, why raises rarely make you feel richer, and practical ways to keep it in check.","category":"finance","date":"June 18, 2026","author":"ByteLedger Team","readTime":"3 min read","hue":45}}