Media Type Registry
Sequential JSON: Multiple concatenated JSON documents suitable for streaming
Media Type(s):
• application/jsonl (not IANA-registered) – JSON Lines
• application/json-seq (IANA) – RFC7464, RFC8091
• application/x-ndjson (not IANA-registered) – Newline Delimited JSON
OAS References:
• Sequential Media Types (Media Type Object)
• Streaming Sequential Media Types (Media Type Object)
• Sequential JSON (Media Type Object)
Summary
Sequential JSON media types concatenate multiple JSON documents into one document or stream, and only vary in their choices of delimiter and the restrictions on what whitespace is allowed between JSON syntax tokens.
Remarks
All sequential JSON media types support the same two approaches:
- Use the
schema
field to model the whole document as if it were a JSON array - Use
itemSchema
to model one item at a time for streaming purposes, where all items use the same schema