# The --json envelope

> croft docs json

Every command takes --json and prints exactly one JSON object on stdout; progress and logs go to stderr.

```text
{schemaVersion: 1, ok, command, croftVersion, database, timezone, durationMs, data, problems[], next[],
 confirmation?}
```

- ok: the command itself did what it was asked. For run it is false when any asset failed.
- problems[]: see [`croft docs errors`](https://croft.zabaca.com/docs/reference/errors.md).
- next[]: [{command, reason}]. A destructive command never appears in next; it comes only as
  confirmation: {token, expiresAt, command, impact}. Ask the user before running croft confirm.
- Timestamps are ISO-8601 with the project offset (2026-09-21T22:00:00-07:00), so they agree with ::DATE
  in SQL. Durations are milliseconds.
- HUGEINT, DECIMAL and integers beyond ±2^53 are strings, inside JSON columns too.
- Every value found in .env is replaced with [redacted:NAME] in messages. In data (query rows) only declared
  secrets and credential-looking values are replaced, and data then carries redactedValues: true.
- Outside a project, database is "" and timezone is this machine's zone.
- JSON Schemas (draft 2020-12) of every command's envelope ship with croft, in
  node_modules/@zabaca/croft/schemas/: <command>.schema.json, and envelope.schema.json for any command.

The same page is in the CLI: `croft docs json`.

Source: https://croft.zabaca.com/docs/reference/json/
