Static methods
staticapplyOperation(data:JSONData, operation:JSONPatchOperation):JSONData
staticapplyPatch(data:JSONData, patch:Array<JSONPatchOperation>):JSONData
For the given JSON data, apply all the provided JSONPatch operations.
Parameters:
data | A JSON data object. You can pass |
|---|---|
patch | An array of JSONPatch operations to perform. |
Returns:
The resulting JSON data.
Throws:
error | If any of the operations fail or any of the |
|---|
See also:
staticapplyPatches(data:JSONData, patchBatch:Array<Dynamic>):JSONData
For the given JSON data, apply all the provided JSONPatches.
Parameters:
data | A JSON data object. You can pass |
|---|---|
patchBatch | Either a JSON Patch (as an array of operations) or an array of JSON Patches (i.e. an array of arrays of operations) If multiple patches are provided, each will apply to the data in order. In the event of a failed patch, the data will not be modified and the next patch will be evaluated. |
Returns:
The resulting JSON data.