# JSON output

> The JSON documents that ormaos prints with --json, one JSON Schema per kind, inferred from the real documents of the example programs.

Every reading verb and `guide` print one JSON document on stdout with `--json`, also for errors. `ormaos run --json-out FILE` writes the overview to a file. Every document has `kind`, `version`, `next` and `next_commands`; every document about a recording has `program_data`. See [--json for agents](/python/agents/json.md).

The schemas below are inferred from every `--json` document that [`scripts/generate.py`](https://github.com/ormaos/docs/blob/main/scripts/generate.py) printed on the example programs: a field is `always` present when every document of that kind had it. They describe the version these docs pin; the format is provisional.

| Kind | Printed by |
|---|---|
| `show` | `ormaos show`, `ormaos run --json-out` |
| `tree` | `ormaos tree` |
| `exceptions`, `exception` | `ormaos exceptions` (a list, one) |
| `io`, `io_event` | `ormaos io` (groups, one event) |
| `logs`, `log_record` | `ormaos logs` (groups, one record) |
| `paths`, `path` | `ormaos path` (the functions with lines, the steps of one call) |
| `diff` | `ormaos diff` |
| `list` | `ormaos list` |
| `status` | `ormaos status` |
| `guide`, `agents_md` | `ormaos guide`, `ormaos guide --agents-md` |
| `error` | any verb, when it exits with `1` or `2` |

## show

[`/schemas/show.json`](/schemas/show.json): The JSON document of kind `show` that ormaos 0.0.1 prints with --json (run --json-out, show). Inferred from 15 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|


## tree

[`/schemas/tree.json`](/schemas/tree.json): The JSON document of kind `tree` that ormaos 0.0.1 prints with --json (tree). Inferred from 26 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|


## exceptions

[`/schemas/exceptions.json`](/schemas/exceptions.json): The JSON document of kind `exceptions` that ormaos 0.0.1 prints with --json (exceptions). Inferred from 8 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `address` | string | always |
| `exceptions` | array | always |
| `kind` | string | always |
| `limit` | integer | always |
| `next` | array | always |
| `next_commands` | array | always |
| `not_shown` | integer | always |
| `offset` | integer | always |
| `program_data` | object | always |
| `recording` | string | always |
| `scope` | null | always |
| `swallowed` | integer | always |
| `taken_by_interpreter` | object | always |
| `total` | integer | always |
| `uncaught` | integer | always |
| `version` | integer | always |

## exception

[`/schemas/exception.json`](/schemas/exception.json): The JSON document of kind `exception` that ormaos 0.0.1 prints with --json (exceptions). Inferred from 7 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|


## io

[`/schemas/io.json`](/schemas/io.json): The JSON document of kind `io` that ormaos 0.0.1 prints with --json (io). Inferred from 13 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|


## io_event

[`/schemas/io_event.json`](/schemas/io_event.json): The JSON document of kind `io_event` that ormaos 0.0.1 prints with --json (io). Inferred from 3 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|


## logs

[`/schemas/logs.json`](/schemas/logs.json): The JSON document of kind `logs` that ormaos 0.0.1 prints with --json (logs). Inferred from 9 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `address` | string | always |
| `by_level` | object | always |
| `dropped` | integer | always |
| `groups` | array | always |
| `kind` | string | always |
| `level_filter` | null | always |
| `limit` | integer | always |
| `next` | array | always |
| `next_commands` | array | always |
| `not_shown` | integer | always |
| `offset` | integer | always |
| `only_dropped` | boolean | always |
| `program_data` | object | always |
| `recording` | string | always |
| `scope` | null or object | always |
| `total` | integer | always |
| `version` | integer | always |

## log_record

[`/schemas/log_record.json`](/schemas/log_record.json): The JSON document of kind `log_record` that ormaos 0.0.1 prints with --json (logs). Inferred from 2 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `address` | string | always |
| `arguments` | integer | always |
| `at` | object | always |
| `call` | object | always |
| `count` | integer | always |
| `dropped` | boolean | always |
| `inside` | array | always |
| `kind` | string | always |
| `level` | string | always |
| `level_number` | integer | always |
| `logger` | string | always |
| `next` | array | always |
| `next_commands` | array | always |
| `process` | integer | always |
| `program_data` | object | always |
| `recording` | string | always |
| `t_s` | number | always |
| `template` | string | always |
| `thread` | integer | always |
| `version` | integer | always |

## paths

[`/schemas/paths.json`](/schemas/paths.json): The JSON document of kind `paths` that ormaos 0.0.1 prints with --json (path). Inferred from 2 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `address` | string | always |
| `functions` | array | always |
| `kind` | string | always |
| `limit` | integer | always |
| `next` | array | always |
| `next_commands` | array | always |
| `not_shown` | integer | always |
| `offset` | integer | always |
| `path_scope` | array | always |
| `program_data` | object | always |
| `recording` | string | always |
| `total` | integer | always |
| `version` | integer | always |

## path

[`/schemas/path.json`](/schemas/path.json): The JSON document of kind `path` that ormaos 0.0.1 prints with --json (path). Inferred from 2 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `address` | string | always |
| `call` | object | always |
| `cut_by_limit_when_recording` | boolean | always |
| `kind` | string | always |
| `limit` | integer | always |
| `next` | array | always |
| `next_commands` | array | always |
| `not_shown_after` | integer | always |
| `not_shown_before` | integer | always |
| `offset` | integer | always |
| `program_data` | object | always |
| `recording` | string | always |
| `source` | object | always |
| `steps` | array | always |
| `total` | integer | always |
| `version` | integer | always |

## diff

[`/schemas/diff.json`](/schemas/diff.json): The JSON document of kind `diff` that ormaos 0.0.1 prints with --json (diff). Inferred from 3 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `a` | object | always |
| `b` | object | always |
| `calls` | object | always |
| `code` | object | always |
| `context` | array | always |
| `data` | object | always |
| `exceptions` | object | always |
| `io` | object | always |
| `kind` | string | always |
| `limit` | integer | always |
| `logs` | object | always |
| `matched_by` | string | always |
| `next` | array | always |
| `next_commands` | array | always |
| `not_collected` | object | always |
| `not_compared` | array | always |
| `program_data` | object | always |
| `version` | integer | always |

## list

[`/schemas/list.json`](/schemas/list.json): The JSON document of kind `list` that ormaos 0.0.1 prints with --json (list). Inferred from 9 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `kind` | string | always |
| `limit` | integer | always |
| `next` | array | always |
| `next_commands` | array | always |
| `not_shown` | integer | always |
| `offset` | integer | always |
| `program_data` | object | always |
| `recordings` | array | always |
| `root` | string | always |
| `total` | integer | always |
| `unreadable` | array | always |
| `version` | integer | always |

## status

[`/schemas/status.json`](/schemas/status.json): The JSON document of kind `status` that ormaos 0.0.1 prints with --json (status). Inferred from 1 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `can_record` | boolean | always |
| `executable` | string | always |
| `incomplete` | array | always |
| `kind` | string | always |
| `last` | object | always |
| `limits` | object | always |
| `looked_at` | integer | always |
| `next` | array | always |
| `next_commands` | array | always |
| `ormaos` | string | always |
| `program_data` | object | always |
| `python` | string | always |
| `recording_now` | null | always |
| `recordings` | integer | always |
| `root` | string | always |
| `running` | array | always |
| `space` | object | always |
| `starts_in_child_processes` | boolean | always |
| `unreadable` | array | always |
| `version` | integer | always |

## guide

[`/schemas/guide.json`](/schemas/guide.json): The JSON document of kind `guide` that ormaos 0.0.1 prints with --json (guide). Inferred from 2 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `kind` | string | always |
| `next` | array | always |
| `next_commands` | array | always |
| `text` | string | always |
| `this_python` | object | always |
| `version` | integer | always |

## agents_md

[`/schemas/agents_md.json`](/schemas/agents_md.json): The JSON document of kind `agents_md` that ormaos 0.0.1 prints with --json (guide). Inferred from 1 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `changed` | boolean | always |
| `diff` | string | always |
| `file` | null | always |
| `kind` | string | always |
| `next` | array | always |
| `next_commands` | array | always |
| `snippet` | string | always |
| `version` | integer | always |

## error

[`/schemas/error.json`](/schemas/error.json): The JSON document of kind `error` that ormaos 0.0.1 prints with --json (show, tree). Inferred from 2 real documents: a field is required when every one had it.

| Field | Type | Present |
|---|---|---|
| `error` | string | always |
| `kind` | string | always |
| `next` | array | always |
| `next_commands` | array | always |
| `program_data` | object | always |
| `version` | integer | always |

---

Source: https://docs.ormaos.com/python/reference/json-output/ · ormaos 0.0.1 · ormaos-python 968f69776c · ormaos-examples 6e27be5922
