Formats
Multi‑format input and output
Content-Type and Accept.
Supported Formats
Conduit supports both input and output in the following formats:
JSON
The default format. Fully supported for both input and output.
XML
Custom XML encoder produces stable element trees with schema‑ordered fields.
YAML
Readable, indentation‑based format. Supported for both input and output.
TOML
Table‑oriented format. Output uses [table] or [[table]] blocks.
NDJSON
One JSON object per line. Ideal for streaming and ingestion pipelines.
CSV
Output only. Conduit writes header rows and schema‑ordered values.
CBOR
Binary format for compact machine‑to‑machine communication.
Format Negotiation
Conduit determines the output format using the following rules:
?format=query parameter Highest priority. Supportsjson,xml,yaml,toml,ndjson,csv,cbor.- Input format If the request body was XML, YAML, TOML, or JSON, Conduit uses that format for output unless the input was CSV (CSV input is not supported).
- Fallback If no format is specified, Conduit defaults to JSON.
Clients select the desired output format using the Accept header or the
?format= query parameter:
GET /v1/players?format=xml
Accept: application/x-yaml
Input Formats
Conduit accepts input in:
- JSON
- YAML
- TOML
- XML
CSV input is not supported. If a request is sent with Content-Type: text/csv,
Conduit returns an error.
POST /v1/players
Content-Type: application/json
{"name": "Alice", "score": 42}
Output Formats
Every endpoint can return data in any supported format. Examples:
GET /v1/players?format=toml
GET /v1/players?format=ndjson
GET /v1/players?format=csv
Schema‑aware formats (JSON, XML, YAML, TOML, NDJSON, CSV) preserve column ordering based on the database schema. Extra fields are appended alphabetically.