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
- Enter from, path. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| from | From | Required. Text; maximum UTF-16 length 8192. |
| path | Path | Required. Text; maximum UTF-16 length 8192. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| conflict | Conflict | Required. Boolean. |
| same | Same | Required. Boolean. |
{
"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
-
Calculation and input contract: json/json-patch-move-prefix-conflict — tool.io
-
JavaScript Object Notation (JSON) Patch (RFC 6902) — RFC Editor / IETF
Similar or alternative tools
- JSON Pointer Common Prefix Length
Parse and decode slash-delimited tokens, replacing ~1 with slash and ~0 with tilde after validating escapes.
- JSON Patch Add Root Replacement Token
Require path empty or slash prefixed and set replacesDocument only for the empty root path.