Skip to content

Main content

JSON Patch Array Append Context Check Tool

Calculate json patch array append context check from explicit caller-supplied inputs.

Loading tool…

Description

Mark append for token dash.

JSON Patch describes operations at pointer locations, and operation context determines whether a location is usable. Array append tokens, root targets, and scalar equality have narrow semantics.

Mark append for token dash.

When to use this tool

Use JSON Patch Array Append Context Check when you need one explicit patch-context check.

How to use the tool and how it works

  1. Enter token, operation, parentIsArray. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read append, allowed. Inspect append, allowed before interpreting the associated values.

Mark append for token dash. It is allowed unless the parent is an array and the operation is not add.1

Input fieldMeaning and unitsAccepted input
tokenTokenRequired. Text; maximum UTF-16 length 8192.
operationOperationRequired. Text; one of "add", "remove", "replace", "test"; maximum UTF-16 length 8192.
parentIsArrayParent Is ArrayRequired. Boolean.
Output fieldInterpretationReturned shape
appendAppendRequired. Boolean.
allowedAllowedRequired. Boolean.
json
{
  "input": {
    "token": "-",
    "operation": "remove",
    "parentIsArray": true
  },
  "output": {
    "append": true,
    "allowed": false
  }
}

Limitations and assumptions

  • Other tokens automatically pass this narrow check; array bounds, target existence, and full patch validity are not assessed.
  • Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.

Alternative or Complementary methods

Validate and apply the full patch transaction against the actual document using a conforming implementation.

References

  1. Calculation and input contract: json/json-patch-array-append-context-check — tool.io

Similar or alternative tools