What do omitted, null, [] and "" mean in this PATCH body under merge-patch, JSON Patch or a declared dialect?
For an agent about to send a PATCH or update body: states, per field, what omitted / null / [] / "" mean under the declared dialect (RFC 7396 merge patch, RFC 6902 JSON Patch, or caller-declared semantics) and checks the body against stated intents such as 'clear this field', 'leave this alone' or 'set to empty array'. With a target document it applies the patch and compares the result; without one it reasons about the patch alone and says when an intent cannot be verified. Does not know which dialect a given API uses: the caller declares it. Merge patch cannot store a null (null deletes); JSON Patch can.
What you get
Stops 'null means clear' being sent to an API where null deletes, or [] wiping a list the agent meant to leave alone.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/update-dialect. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/update-dialect \
-H 'content-type: application/json' \
-d '{"dialect":"merge-patch","payload":{"nickname":null,"tags":[]},"intents":[{"path":"/nickname","expect":"null"},{"path":"/email","expect":"unchanged"}]}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
dialect | string; one of "merge-patch", "json-patch", "caller" | yes | merge-patch = RFC 7396, json-patch = RFC 6902 (payload is an array of operations), caller = semantics in callerSemantics. |
payload | any | yes | The PATCH body. |
target | any | no | Current document, if available. Enables applying the patch and exact checks. |
intents | array<object>; max 100 items | no | |
callerSemantics | object | no | Required when dialect is 'caller': what each payload form means in that API. |
Example request body
{
"dialect": "merge-patch",
"payload": {
"nickname": null,
"tags": []
},
"intents": [
{
"path": "/nickname",
"expect": "null"
},
{
"path": "/email",
"expect": "unchanged"
}
]
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
effects | array<object> | no | At most 500 listed, in payload order. |
effectCount | integer | no | Total effects found, which can exceed the number listed. |
verdicts | array<object> | no | |
applied | any | no | The document after applying the patch; present only when a target was given and the patch applied. |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the execution-safety-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent