Skip to content
AI-powered appsNewChat, vision, voice, generationBookings & schedulingAppointments that book themselvesShops & sellingA storefront in every pocketClient & businessRun the operation from one placeCommunities & clubsA home that is not a group chat
Health & wellnessHabits, tracking and calmGames2D, 3D and multiplayerPersonal & toolsThe tool you wish existedInternal toolsThe tool ops never had time for
See all use cases
ArcadeNewPricingSecurity
EngineThe game engine and World EditorHow it worksFrom one sentence to a live productDocsGuides for building and publishingBlogStories, guides and newsChangelogWhat shipped latelyStatusUptime of every serviceSupportGet help from the team
AI-powered appsBookings & schedulingShops & sellingClient & businessCommunities & clubsHealth & wellnessGamesPersonal & toolsInternal tools
See all use cases
ArcadeNewPricingSecurity
EngineHow it worksDocsBlogChangelogStatusSupport
Language
Blog
GlossaryNovember 22, 20263 min read

What is JSON?

JSON is how apps write structured data as text. Here are its six building blocks, examples from an API, a save file and a level, and the errors that trip people up.

Startbase Team
Editorial ink illustration of an open card catalog drawer with nested labeled dividers, one raised card tab in ember orange

Key takeaways

  • JSON writes data as labeled values in plain text: objects in braces, lists in brackets.
  • It has six value types: string, number, true/false, null, object and array. No dates, no comments.
  • APIs, webhooks, config files, game saves and levels all commonly use it.

Short for JavaScript Object Notation, JSON is a plain-text way to write structured data, labels paired with values, nested as deep as you need, so that any program in any language can read it. Most web APIs speak it, and many apps and games store settings, saves and levels in it.

A filled-in paper form is a good mental picture. Each field has a label ("Name", "Age") and an answer, some answers are lists ("Allergies: nuts, shellfish"), and a section can contain sub-sections. JSON is that form written as text.

The six building blocks

  • String: text in double quotes, "Lisbon".
  • Number: 42, 3.14, -7. No quotes.
  • Boolean: true or false.
  • null: "no value", different from 0 or an empty string.
  • Object: labeled values in braces, { "name": "Ana", "level": 7 }. Labels (keys) are always double-quoted strings.
  • Array: an ordered list in brackets, [ "sword", "potion", "map" ].

That is the whole language. Everything else is nesting: objects inside arrays inside objects.

Three places you will see it

An API response

Ask a weather service for a forecast and the reply might be `{ "city": "Lisbon", "tomorrow": { "high": 21, "low": 14, "rain_chance": 0.1 } }`. The app reads tomorrow.high and shows 21. More in what is an API.

A game save

`{ "version": 3, "coins": 1250, "unlocked": ["forest", "caves"], "settings": { "music": 0.6, "haptics": true } }`. The version field matters: when you change the save shape later, old saves can be upgraded instead of crashing the game (saving game progress).

A level

Levels are often JSON too: a grid of tile numbers, plus a list of objects such as { "type": "spike", "x": 12, "y": 4 }. Data-driven levels mean a designer can edit content without touching game code.

Mistakes that break JSON

  1. 01A trailing comma after the last item, [1, 2, 3,], is invalid, even though JavaScript allows it.
  2. 02Single quotes. Strings and keys need double quotes.
  3. 03Comments. JSON has none. Use a "note" field, or a format that allows comments for config.
  4. 04Dates. There is no date type. Store ISO strings like "2026-11-22T09:30:00Z" and convert on read.
  5. 05Big numbers. IDs longer than about 15 to 16 digits can lose precision in JavaScript. Store long IDs as strings.

JSON when building with Startbase

You will see JSON in function test results, logs and webhook payloads, and Startbase Cloud's Postgres database can store it in jsonb columns. That is handy for flexible extras (a user's settings blob), but data you filter or join on usually belongs in real columns (database basics). Pasting a JSON sample into your brief is one of the clearest ways to tell the agent the exact shape you want.

Save progress as JSON in this shape: { "version": 1, "coins": number, "bestTimes": { levelId: seconds }, "unlocked": [levelId], "settings": { "music": 0 to 1, "sfx": 0 to 1 } }. When the version changes, upgrade old saves instead of resetting them, and fall back to defaults if the save cannot be parsed.

Common confusions

  • JSON vs a JavaScript object. They look alike, but JSON is text with stricter rules; code turns one into the other with JSON.parse and JSON.stringify.
  • JSON vs a database. A JSON file is fine for a save; shared data many users edit at once belongs in a database schema.
  • JSON vs CSV. CSV is a flat table; JSON handles nesting and lists inside records.

Frequently asked questions

Is JSON a programming language?

No. It is a data format: it describes values but cannot run anything. It came from JavaScript syntax but is used by nearly every language.

Can JSON have comments?

Standard JSON cannot. Some tools accept variants with comments for config files, but data sent between programs should be plain JSON.

On this page

  • The six building blocks
  • Three places you will see it
  • Mistakes that break JSON
  • JSON when building with Startbase
  • Common confusions

Keep reading

More in Glossary
Editorial ink illustration of a hand-cranked music box drum plucking a metal comb, the crank handle in ember orange
GlossaryNovember 22, 2026

What is a game loop?

Every real-time game runs one repeating cycle: read input, update the world, draw it. Here is what that cycle looks like and why it decides how your game feels.

3 min read
Editorial ink illustration of a brass stopwatch beside a small wind-up toy car, the second hand in ember orange
GlossaryNovember 22, 2026

What is delta time?

Delta time is the number that keeps your game the same speed on every screen. Here is how to use it, where it breaks, and how to spot a game that forgot it.

3 min read

Read less. Ship more.

Everything in this post is one prompt away. Describe your app and watch it build.

Start building

Apps, games, backends and publishing from one conversation.

Product

  • Features
  • Use cases
  • Pricing
  • Changelog

Resources

  • Blog
  • Docs
  • Support
  • Status
  • Security

Contact

  • w@startbase.ai
  • X / Twitter
  • LinkedIn
  • Instagram

Legal

  • Terms
  • Privacy

© 2026 Startbase. All rights reserved.