---
schema_version: "1"
id: 656bf05620a5f15f15d2efc5a0b688970bceceae89641e8a7c486b798d2d5f7f
title: Diff Types (dw::util::Diff)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dw-diff-types.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dw-diff-types
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 63f02e0de873bcb57a84094dede25dbc95eb1b62792794f8e0b9e56cd226237f
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# Diff Types (dw::util::Diff)

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

<table><colgroup><col> <col> <col></colgroup><thead><tr><th>Type</th><th>Definition</th><th>Description</th></tr></thead><tbody><tr><td><p>Diff</p></td><td><p><code>type Diff = { matches: Boolean, diffs: Array&lt;Difference&gt; }</code></p></td><td><p>Describes the entire difference between two values.</p><p><strong>Example with no differences</strong>:</p><p><code>{ "matches": true, "diffs": [ ] }</code></p><p><strong>Example with differences</strong>:</p><p><code>{ "matches": true, "diffs": [ "expected": "4", "actual": "2", "path": "(root).a.@.d" ] }</code></p><p>See the <code>diff</code> function for another example.</p></td></tr><tr><td><p>Difference</p></td><td><p><code>type Difference = { expected: String, actual: String, path: String }</code></p></td><td><p>Describes a single difference between two values at a given structure.</p></td></tr></tbody></table>
