json
scan
Scan JSON documents with values and version facts.
strata json scandb.json.scan(start: 'Optional[str]' = None, *, limit: 'Optional[int]' = None, cursor: 'Optional[Any]' = None) -> 'Page'wire json_scan
Scans visible JSON documents starting at an optional document key. Each item includes the key, full document value, and commit metadata exposed by the executor output.
Paginated responses use opaque cursors. Clients should pass the returned cursor back to the same command shape and must not parse cursor contents.
To see the complete help for this command, run:
strata json scan --helphelp(db.json.scan)
Example
Scan documents from the start, in key order.
strata json set a $ {"v":1}strata json set b $ {"v":2}strata json scan
_ = db.json.set_many([{"key": "a", "path": "$", "value": {"v": 1}}, {"key": "b", "path": "$", "value": {"v": 2}}])[row.value for row in db.json.scan()]
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| branch | string or null | no | Target branch. Defaults to the executor handle branch. |
| limit | integer or null | no | Optional row limit. |
| space | string or null | no | Target product space. Defaults to `"default"`. |
| start | string or null | no | Optional inclusive start document key. |
Returns
Page<JsonSampleItem, String>
- dataobject
Shared pagination continuation facts.
- typestring
Errors
Recover by code. Retry policy and commit outcome come from the shipped error registry.
| Code | Retry | Commit outcome |
|---|---|---|
| failed_precondition.engine.runtime_closed | never | not_started |
| not_found.engine.branch | never | not_applicable |
| invalid_argument.engine.product_space | never | not_started |
| invalid_argument.engine.json_document_id | never | not_started |