RFC 8259 · Data Serialization

JSON Payloads & Schema Engineering

JavaScript Object Notation (JSON) is the standard UTF-8 text format for structured payloads over HTTP APIs and WebSocket text frames.

1. RFC 8259 Data Types

TypeSyntaxExample
ObjectKey-value map with double-quoted keys{"ok": true}
ArrayOrdered list of values[1, 2, 3]
StringDouble-quoted UTF-8 text"hello"
NumberBase-10 integer or float42, 3.14

2. Typed WebSocket Envelopes

{
  "type": "telemetry.tick",
  "seq": 1042,
  "payload": { "status": "healthy", "rttMs": 14.2 }
}

3. NDJSON Line-Delimited Streaming

{"seq":1,"event":"connected"}
{"seq":2,"event":"subscribed","topic":"status"}