CBOR
CBOR input and output
CBOR Input
To send CBOR to Conduit, set the Content-Type header to
application/cbor.
CBOR binary payload (not shown)
Conduit decodes CBOR objects into schema‑aware rows. CBOR maps cleanly to JSON‑like structures: maps, arrays, strings, numbers, booleans, and null.
CBOR Output
CBOR output is selected when:
?format=cboris usedAccept: application/cboris sent- The input format is CBOR
GET /v1/books?format=cbor
CBOR responses are encoded using canonical CBOR rules for deterministic output.
CBOR binary response (not shown)
CBOR Schema Responses
Schema endpoints return CBOR describing the table’s columns, types, and metadata.
GET /v1/schema/books?format=cbor
The structure matches the JSON schema, encoded in CBOR.
CBOR binary schema (not shown)
CBOR Error Responses
Conduit returns a consistent CBOR error envelope for all error conditions. This structure matches JSON, XML, YAML, TOML, NDJSON, and CSV.
Example CBOR error (JSON representation shown for clarity):
{
"error": {
"title": "Resource Not Found",
"message": "The requested record does not exist.",
"status": 404,
"details": [
"No record with ID 999 exists in table 'books'."
],
"documentation_url": "https://docs.conduit.dev/errors/not-found"
}
}
The actual response is CBOR‑encoded using Conduit’s canonical encoder.
Format Negotiation
CBOR is selected when:
?format=cboris usedAccept: application/cboris sent- The input format is CBOR
GET /v1/books?format=cbor