apply_preview
Preview how an RFC 6902 JSON Patch changes a document without writing anything, returning the patched result and a summary of semantic changes or the failing operation.
Instructions
Preview what an RFC 6902 JSON Patch does to a document, without writing anything.
Supports add, remove, replace, move, copy and test. Returns the patched document and a semantic summary of what changed versus the original. A failing operation is reported with its index and reason, and nothing is returned in that case.
Args: a: file path, or the document itself when inputs='text'. patch: the patch as a JSON array (or a JSON string of one). inputs, format, strip_comments, encoding: as in diff_files. max_result_chars: the result is cut off after this many characters (the summary is not).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| a | Yes | ||
| patch | Yes | ||
| format | No | auto | |
| inputs | No | files | |
| encoding | No | auto | |
| strip_comments | No | ||
| max_result_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||