Skip to main content

Module json

Module json 

Source
Expand description

Machine-readable JSON output.

All commands that support --json print exactly one JSON document to stdout, wrapped in a common envelope:

{
  "ctx_version": "0.2.1",
  "command": "query.find",
  "generated_at": "2026-07-09T12:00:00Z",
  "data": { ... }
}

Field names are snake_case throughout, and symbols are always emitted as SymbolRef objects (never bare strings). See docs/json-output.md for the full contract.

Structs§

SymbolRef
A reference to a symbol in JSON output.

Functions§

emit
Pretty-print the envelope for command to stdout.
envelope
Wrap a command payload in the standard ctx JSON envelope.