JSON-P 1.1 also introduced support for JSON Patch, another Internet Engineering Task Force standard, this one providing a series of operations that can be applied to a JSON document. JSON Patch allows us to perform partial updates on a JSON object.
The following operations are supported by JSON Patch:
JSON Patch Operation |
Description |
add |
Adds an element to a JSON document. |
remove |
Removes an element from a JSON document. |
replace |
Replaces a value in a JSON document with a new value. |
move |
Moves a value in a JSON document from its current location in the document to a new position. |
copy |
Copies a value in a JSON document to a new location in the document. |
test |
Verifies that the value in a specific location in a JSON document is equal to the specified value. |
JSON-P supports all of the preceding JSON Patch operations, which...