BuildQuill
Lessons 2 / 6JSON Foundations7 min
Lesson 2 of 67 minJSON Foundations

JSON Syntax Rules

Valid JSON follows strict punctuation rules. Small quote, comma, or bracket mistakes can break the whole payload.

Core concepts

  • Keys must use double quotes.
  • Strings must use double quotes.
  • Trailing commas are not allowed.
  • Brackets and braces must close in the right order.

Example

{
  "id": 42,
  "active": true,
  "tags": ["api", "json"]
}

Practice

Paste a broken JSON sample into the playground and fix one issue at a time until it validates.

Checklist

  • Check quotes.
  • Check commas.
  • Check matching braces.
  • Check booleans and null values.

Quiz

Which value is valid JSON?

Playground