Contact Free trial Login

Diff Types (dw::util::Diff)

Type Definition Description

Diff

type Diff = { matches: Boolean, diffs: Array<Difference> }

Describes the entire difference between two values.

Example with no differences:

{ "matches": true, "diffs": [ ] }

Example with differences:

{ "matches": true, "diffs": [ "expected": "4", "actual": "2", "path": "(root).a.@.d" ] }

See the diff function for another example.

Difference

type Difference = { expected: String, actual: String, path: String }

Describes a single difference between two values at a given structure.