public interface JsonPatch
JsonPatch is a format for expressing a sequence of operations to apply on a target JSON document.
A JsonPatch is an array of 'operations' in the form e.g.
[ { "op": "add", "path": "/foo/-", "value": ["abc", "def"] } { "path": "/a/b/c", "op": "add", "value": "foo" } ]
The 'operations' are performed in the order they are in the JsonPatch and applied to the 'result' JSON document from the previous operation.
JsonPatch.Operation
Modifier and Type | Interface and Description |
---|---|
static class |
JsonPatch.Operation
An enumeration of available operations for
JsonPatch . |
Modifier and Type | Method and Description |
---|---|
<T extends JsonStructure> |
apply(T target)
Applies the
JsonPatch to the given target . |
JsonArray |
toJsonArray() |
<T extends JsonStructure> T apply(T target)
JsonPatch
to the given target
. If the
given target
is null
a NullPointerException
will be thrown.target
- - the target to apply the JsonPatch
JsonStructure
NullPointerException
- if target
is null
Copyright © 2010 - 2020 Adobe. All Rights Reserved