Class: JSONDelta

diffusion.datatypes. JSONDelta


new JSONDelta()

Structural delta type for JSON.

A JSONDelta describes the differences between two JSON values. Unlike a binary delta, a structural delta can be queried to determine its effect. The removed and inserted methods provide full details of the differences between the two values.

An instance can be created from two JSON values using JSON#jsonDiff.

Since:
  • 5.9
Author:
  • Push Technology Limited

Classes

ChangeMap

Methods


hasChanges()

Returns whether the two JSON values used to create this instance are different.

Returns:

true if this delta has an effect

Type
Boolean

inserted()

Returns the parts of the second JSON value not found in the first JSON value.

Returns:

the removed parts. The JSON Pointer references used for the keys are relative to second JSON value.

Type
diffusion.datatypes.JSONDelta.ChangeMap

removed()

Returns the parts of the first JSON value not found in the second JSON value.

Returns:

the removed parts. The JSON Pointer references used for the keys are relative to first JSON value.

Type
diffusion.datatypes.JSONDelta.ChangeMap