json

delete

Delete a whole JSON document or one path inside it.

strata json delete

wire json_delete

Deletes the root path `$` to remove the whole document, or a nested path to remove one field or array element. Missing documents and paths produce a no-op delete acknowledgement rather than an error.

Successful mutations return an acknowledgement of the outcome: for a state-changing write, the affected target with the mutation effect and commit facts; for mutations that produce a domain result (such as a branch or a promotion outcome), that result object.

To see the complete help for this command, run:

strata json delete --help

Example

Delete a document.

strata json set temp $ {"x":1}strata json delete temp $strata json exists temp

Parameters

NameTypeRequiredDescription
keystringyesDocument key.
pathstringyesJSON path.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

MutationAck<JsonDelete>

  • dataobject
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

← All 16 JSON commands

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