Back to blog
Basics3 min readVektosys

What Is JSON? A Clear Introduction for Developers

Learn what JSON is, why it became the standard for APIs and configs, and how objects, arrays, and data types work in practice.

Understanding JSON in plain language

JSON (JavaScript Object Notation) is a lightweight text format for storing and exchanging structured data. Despite the name, it is language-independent: Python, Go, Java, TypeScript, and countless other runtimes can parse and produce it. When an API returns a user profile, a config file lists feature flags, or a frontend stores local preferences, JSON is often the glue that holds the payload together.

JSON became popular because it is readable by humans and efficient for machines. Compared with older formats, it maps cleanly to everyday programming concepts—objects, lists, strings, numbers, booleans, and null—without heavy markup.

Core building blocks

A JSON value is one of six types:

  • Object — unordered collection of name/value pairs wrapped in { }
  • Array — ordered list of values wrapped in [ ]
  • String — double-quoted Unicode text
  • Number — integer or floating-point (no NaN or Infinity)
  • Booleantrue or false
  • null — intentional empty value

Here is a small example:

{
  "id": 42,
  "name": "Ada Lovelace",
  "active": true,
  "roles": ["admin", "editor"],
  "profile": {
    "city": "London",
    "score": null
  }
}

Keys must always be double-quoted strings. Trailing commas are not allowed. Those two rules alone explain a large share of “invalid JSON” errors beginners hit.

Why teams choose JSON

JSON strikes a practical balance. It is compact enough for network responses, expressive enough for nested documents, and ubiquitous enough that every HTTP client library knows how to handle it. Content-Type headers commonly use application/json. Frontend frameworks hydrate state from JSON. Mobile apps deserialize JSON payloads into typed models.

It is also easy to inspect. You can open a response in a text editor, pretty-print it, and immediately see structure—no special binary viewer required. Tools such as JSON Editor make formatting, validation, and conversion a one-click habit during debugging.

JSON is not JavaScript (exactly)

JSON looks like a subset of JavaScript object literals, but it is stricter:

  • Property names must be quoted.
  • Single quotes are invalid for strings.
  • Comments (// or /* */) are not part of the JSON specification.
  • Functions, undefined, and symbols are not representable.

That strictness is a feature. It keeps parsers predictable across languages and reduces ambiguous documents.

Common places you will see JSON

  • REST and GraphQL-adjacent HTTP APIs
  • Configuration files (package.json, tsconfig.json, many CI configs)
  • Browser localStorage and IndexedDB exports
  • Message queues and event payloads
  • Infrastructure-as-code snippets and feature flag systems

Getting started safely

Before you ship a payload, validate that it parses. A single missing quote can break an entire integration. Pretty-print large documents when reading them; minify when optimizing bandwidth. Learn the difference between JSON text and a JavaScript object in memory—you serialize to send, deserialize to use.

Once you understand objects, arrays, and the six value types, the rest of the JSON ecosystem—schemas, JSONPath queries, converters—builds on those foundations. Start with small, valid documents, then grow complexity only when your product needs it.

Related articles