Interactive Cheatsheets
Master JSON parsing, validation, and design patterns.
Naming Conventions
Use camelCase for property keys. It's the standard in JavaScript and most JSON APIs.
{ "firstName": "John" }{ "first_name": "John" } Date Formats
Use ISO 8601 strings (UTC). They are human-readable and universally parsable.
{ "at": "2023-11-01T12:00:00Z" }{ "at": 1698840000 } Arrays
Keep array contents consistent. Don't mix types within a single array unless absolutely necessary.
{ "ids": [1, 2, 3] }{ "ids": [1, "2", true] } Null Handling
Use the actual `null` type, not the string "null" or "NaN".
{ "middleName": null }{ "middleName": "null" } Top-Level Structure
Prefer an object at the root. This allows you to add metadata (pagination, status) later without breaking changes.
{ "data": [...] }[ ... ] Booleans
Use clear names (isX, hasX) and boolean primitives, not 0/1 integers.
{ "isActive": true }{ "active": 1 }