Determines if this change map contains an entry for a given JSON Pointer
the JSON Pointer expression
true
if an entry exists, false if not
Returns a view of the portion of this map whose keys are descendants
of pointer
. If pointer
is contained in this map, it
will be included in the result.
the json pointer expression to derive descendants for
changemap of descendant changes
Returns an array of map entries. Each entry is in the form of a key/value object pair.
The key is a JSON Pointer expression, in string form. The value will be parsed from the underlying JSON object.
the entry array
Example:
changeMap.entrySet().forEach(function(entry) {
console.log(entry.key, entry.value);
});
Retrieve a value from this change map, identified by a JSON Pointer.
the JSON Pointer expression
the change map value, if it exists, otherwise null
Returns a view of the portion of this map whose keys are descendants
or parents of pointer
. If pointer
is contained in
this map, it will be included in the result.
This method can be used to determine whether a structural delta affects a particular part of a JSON value. For example:
if (structuralDelta.removed().intersection("/contact/address").length) {
// The structural delta removes elements that affect '/contact/address'.
}
if (structuralDelta.inserted().intersection("/contact/address").length) {
// The structural delta inserts elements that affect '/contact/address'.
}
the json pointer expression to derive intersection for
changemap of intersection changes
An unmodifiable map describing the changes to a JSON value.
The JSONDelta.inserted method returns a ChangeMap describing the parts of the second JSON value not found in the first JSON value. Similarly, JSONDelta.removed returns a
ChangeMap
describing the parts of the first JSON value not found in the second JSON value.The map contains an entry for each change, as follows:
/0
.An error will be thrown if an invalid JSON pointer expression is passed to get, containsKey, descendants, or intersection. This only occurs if the expression does not start with
/
and is not empty.