# JSON as the Standard — REST API Design: Resources, Status Codes and Security

Source: https://www.skillbyai.com/en/restapi/api-json-format

> See why JSON is the default REST format and handle dates, large numbers and charset correctly.

## Text, typed, and everywhere

JSON is human-readable, maps cleanly onto objects/arrays/strings/numbers/booleans, and has a parser in every language. Unlike XML it carries little ceremony — no closing tags, no attributes-vs-elements debate.

## Always set Content-Type

Return `Content-Type: application/json; charset=utf-8` on every JSON response, even error bodies — clients shouldn't have to guess.

## Numbers and dates need care

JSON has no native date type (use ISO 8601 strings like `2026-09-04T10:00:00Z`) and its numbers can lose precision beyond ~2^53 — send very large IDs as strings.
