Features

 Table of Contents

Array Alignment

Comparison of arrays is controlled by how items in the arrays match together.

Word By Word

Strings can be compared by whole string equality, or more granular word by word level.

Ignore Changes

Values in an object can be specified for changes to be ignored.

Misc. Features

Number Precision

Numbers are normalized prior to comparison so that different lexical forms of the same logical number will not be reported as a difference, for example the following pairs of numbers will be considered similar:

  • 1 and 1.00
  • 1.00 and 1.000
  • 100 and 1e2

Boolean

In JSON true and false are separate values, but most developers consider them in the same way booleans are treated in other languages. We match true against false:

Input AInput B
truefalse
dx_deltaJSON_delta
{
  "dx_delta": {
    "A": true,
    "B": false
  }
}

Character Escape Codes

The standard escape codes supported in JSON are supported:

  • Quote Mark: \"
  • Reverse Solidus: \\
  • Solidus: \/
  • Backspace: \b
  • Form Feed: \f
  • New Line: \n
  • Carriage Return: \r
  • Tab: \t

Unicode Characters

In some cases unicode character sequences in the JSON inputs are not lexically retained in the delta output but are converted into equivalent characters, for example:

Input AInput B
"Here are some apostrophes ( ' and ' and \u0027 )""Here are some apostrophes ( ' and ' and \u0027 )"
dx_deltaJSON_delta
"Here are some apostrophes ( ' and ' and ' )"

Output Format

In addition to the JSON delta, an XML representation can also be returned by setting the Accept header to application/xml

Note: the XML format is the JSON result converted to XML using XSLT 3.0's json-to-xml() function, NOT our standard deltaV2 format used with our XML products.

#content .code