JSON omit pointers
json-omit-pointers · version 1.0.0 · JSON & JSONL · free, no key needed
Deep-clone JSON and delete values at explicit RFC 6901 pointers.
Use when you need to: json omit pointers · remove json pointers · delete json pointers.
Decide before calling
Read the versioned contract and the supported scope below. Reuse json-omit-pointers@1.0.0 when your input, required output and limits match it. Choose another approach for an unsupported operation.
Explain the choice
"I can use json-omit-pointers@1.0.0 for json omit pointers. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."
Supported
- json omit pointers
- remove json pointers
- delete json pointers
Not supported
- json patch document
- omit by regex
Behavior
- Accept only JSON values: null, boolean, finite number, string, array, and plain objects.
- Reject NaN, Infinity, -Infinity, undefined, BigInt, functions, symbols, Date, Map, Set, RegExp, boxed primitives, Buffer, and sparse holes.
- Canonicalize -0 to 0.
- Objects may have null or Object.prototype; use own enumerable string keys only.
- Treat __proto__, constructor, and toString as ordinary own keys. Never mutate Object.prototype.
- Output objects must be Object.create(null). Deep-clone all returned JSON values.
- Bound walk: max depth 32, max nodes 10000, max UTF-8 JSON bytes 250KiB of the input document string if provided as text; when json is already a value, bound the walked node count and depth.
- pointers is a non-empty unique list. Duplicate pointers are invalid_input.
- Reject the empty pointer (cannot omit root). Reject overlapping pointers where one is a prefix of another.
- Each pointer must exist (same rules as get). Delete own keys from objects; splice is not used for arrays: array holes are not allowed, so array index deletes compact the array by removing that index (subsequent indexes shift). To keep determinism, apply deletes from longest pointer / highest array index first after validating all exist on the original.
- Safer array policy: deleting an array index removes that element and compact the array. Multiple indexes into the same array are applied from highest index to lowest after validation against the original.
- Return { json: clone } with null-prototype objects throughout.
Input
json(any JSON value, required)pointers(array of string, required): min items 1; max items 256; each max length 1024
Output
json(any JSON value, required)
Limits
- max json depth: 32
- max json nodes: 10000
- max pointers: 256
- max pointer chars: 1024
Example
Request input:
{
"json": {
"a": 1,
"b": 2
},
"pointers": [
"/a"
]
}
Response:
{
"result": {
"json": {
"b": 2
}
}
}
How to call it
MCP
Connect https://computefirst.net/mcp (setup), then call execute with:
{
"id": "json-omit-pointers",
"version": "1.0.0",
"input": {
"json": {
"a": 1,
"b": 2
},
"pointers": [
"/a"
]
}
}
HTTP (no key)
curl -X POST https://computefirst.net/v1/tools/json-omit-pointers/versions/1.0.0/execute \
-H "Content-Type: application/json" \
-d '{"json":{"a":1,"b":2},"pointers":["/a"]}'
The machine-readable contract is at /v1/tools/json-omit-pointers/versions/1.0.0.
CLI
node cli.mjs run json-omit-pointers 1.0.0 --input input.json --base-url https://computefirst.net
Get the client at /clients/cli/.
Related tools
- JSON array drop keys: Remove specific keys from each object in a JSON array.
- JSON candidate repair: Conservatively repair a JSON candidate (comments, trailing commas, truncation), log every edit and recheck RFC 8259.
- JSON flatten: Flatten a JSON value into a null-prototype map keyed by RFC 6901 JSON Pointers.
- JSON keyed conflicts list: List deterministic content and order conflicts from a three-way JSON keyed-array comparison without resolving them.
- JSON patch apply: Apply an RFC 6902 JSON Patch atomically; returns the document or the failing operation index and pointer.
- JSON patch test only: Evaluate only RFC 6902 test operations without modifying JSON; returns each test result and whether all passed.