Docs menu · Reference

Reads the JSON value at a path inside a document. Current reads return the value with commit metadata; passing a timestamp returns the bare value visible at that point in time. A missing document or path is a found-false result, distinct from a stored JSON null.

Optional reads distinguish present data from missing data. When version or timestamp facts exist on the executor output, SDK mappings should preserve them.

Examples

Read a whole document, a value at a JSON path, or nothing.

CLI

$ strata json set user $ {"age":30,"name":"alice"}
$ strata json get user $
$ strata json get user $.name
$ strata json get absent $

Wire

{"key":"user","path":"$","type":"json_set","value":{"age":30,"name":"alice"}}
{"key":"user","path":"$","type":"json_get"}
{"key":"user","path":"$.name","type":"json_get"}
{"key":"absent","path":"$","type":"json_get"}

Parameters

NameTypeRequiredDescription
as_ofintegernoOptional timestamp in microseconds.
keystringyesDocument key.
pathstringyesJSON path.

Plus the optional scope: branch and space (default to the session branch and the "default" space).

Returns

Maybe<JsonVersionedValue> — a miss returns nothing rather than raising.

Errors

Invocation

  • CLI: strata json get
  • Wire type: json_get

agents: this page as markdown → /docs/reference/json/get.md