Cheatsheets

JSON Cheatsheet

Use this JSON cheatsheet when you need a quick reminder of valid syntax, data types, escaping and common parser errors.

Quick reference

Value types

String"hello"
Number42
Booleantrue
Nullnull

Structures

Object{"name":"DevKitYard"}
Array["html", "css", "json"]
Nested{"user":{"id":1}}
List of objects[{"id":1},{"id":2}]

Rules

KeysKeys must use double quotes
StringsStrings must use double quotes
No trailing comma{"ok": true}
Escape quotes"He said \"hi\""

Escaping and numbers

Quote\"
Backslash\\
Newline\n
Exponent6.02e23

Interchange boundaries

No commentsComments are not valid JSON
No trailing comma{"ok": true}
No undefinedUse null or omit the property
Large integersMay lose precision in JavaScript

Use a string when exact digits must survive.

Examples

CodeValid nested JSON
{
  "name": "DevKitYard",
  "tags": ["tools", "components"],
  "public": true
}
CodeSafely parse unknown JSON
try {
  const value: unknown = JSON.parse(input);
  // Validate the shape before use.
} catch (error) {
  console.error("Invalid JSON", error);
}

JSON FAQ

What is included in the JSON cheatsheet?

JSON Cheatsheet includes quick reference sections, practical examples, common mistakes, tips and links to related DevKitYard tools.

Is the JSON cheatsheet interactive?

This cheatsheet is a static quick reference focused on concise commands, syntax and examples.

When should I use this JSON reference?

Use it when you need to recall syntax, compare common patterns or avoid mistakes without opening a long tutorial.

What should I use after reading this cheatsheet?

Use related DevKitYard tools such as JSON Formatter & Validator, JSON Viewer, JSON Diff Checker when you need to format, validate, generate or inspect real output.