Skip to content

Main content

JSON Patch Move Prefix Conflict Tool

Calculate json patch move prefix conflict from explicit caller-supplied inputs.

Loading tool…

Description

Mark same for identical strings and conflict when a distinct path is beneath from by a slash boundary, including root ancestry.

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 same for identical strings and conflict when a distinct path is beneath from by a slash boundary, including root ancestry.

When to use this tool

Use JSON Patch Move Prefix Conflict when you need one explicit patch-context check.

How to use the tool and how it works

  1. Enter from, path. 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 conflict, same. Inspect conflict, same before interpreting the associated values.

Require empty or slash-prefixed from and path. Mark same for identical strings and conflict when a distinct path is beneath from by a slash boundary, including root ancestry.1

A move source cannot be a proper prefix of its destination, since that would move a value into its own child. This helper checks the path-prefix condition, while actual source and destination existence require the target document.2

Input fieldMeaning and unitsAccepted input
fromFromRequired. Text; maximum UTF-16 length 8192.
pathPathRequired. Text; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
conflictConflictRequired. Boolean.
sameSameRequired. Boolean.
json
{
  "input": {
    "from": "/a",
    "path": "/a/b"
  },
  "output": {
    "conflict": true,
    "same": false
  }
}

Limitations and assumptions

  • This is a lexical prefix check without tilde-escape validation, document traversal, or applying a move.
  • 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-move-prefix-conflict — tool.io

  2. JavaScript Object Notation (JSON) Patch (RFC 6902) — RFC Editor / IETF

Similar or alternative tools