---
schema_version: "1"
id: 7774d92ea8123d3400375d6d73cfc543b81e23d3d10337010c663c30c71b1ab9
title: DataFormat Types (dw::extension::DataFormat)
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.6/dw-dataformat-types.md
canonical_url: https://docs.mulesoft.com/dataweave/2.6/dw-dataformat-types
source_site: docs.mulesoft.com
content_type: documentation
content_hash: b83ce6c40ad9f16d2adc6be893f2c9b9c8dd8d87c4d8d5e760dbddd3f64d9223
description: MuleSoft Documentation Site
release: "2.6"
latest: false
---
---
product: DataWeave
version: 2.6
---

# DataFormat Types (dw::extension::DataFormat)

> 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>DataFormat</p></td><td><div><div><p><code>type DataFormat = { binaryFormat?: Boolean, defaultCharset?: String, fileExtensions?: Array&lt;String&gt;, acceptedMimeTypes: Array&lt;MimeType&gt;, reader: (content: Binary, charset: String, settings: ReaderSettings) -&gt; Any, writer: (value: Any, settings: WriterSettings) -&gt; Binary }</code></p></div></div></td><td><div><div><p>Represents the <code>DataFormat</code> definition and contains the following fields:</p></div><div><ul><li><p><code>binaryFormat</code>: True if this is data format is represented as binary representation instead of text. False if not present.</p></li><li><p><code>defaultCharset</code>: Default character set of this format, if any.</p></li><li><p><code>fileExtensions</code>: Returns the list of file extensions with the <code>.</code> (for example, <code>.json</code>, <code>.xml</code>) to assign to this data format.</p></li><li><p><code>acceptedMimeTypes</code>: The list of MIME types to accept.</p></li><li><p><code>reader</code>: Function that reads raw content and transforms it into the canonical DataWeave model.</p></li><li><p><code>writer</code>: Function that writes the canonical DataWeave model into binary content.</p></li></ul></div><div><p><em>Introduced in DataWeave version 2.2.0.</em></p></div></div></td></tr><tr><td><p>EmptySettings</p></td><td><div><div><p><code>type EmptySettings = Object</code></p></div></div></td><td><div><div><p>Represents a configuration with no settings.</p></div><div><p><em>Introduced in DataWeave version 2.2.0.</em></p></div></div></td></tr><tr><td><p>EncodingSettings</p></td><td><div><div><p><code>type EncodingSettings = { encoding?: String {defaultValue: "UTF-8"} }</code></p></div></div></td><td><div><div><p>Represents encoding settings and contains the following field:</p></div><div><ul><li><p><code>encoding</code>: Encoding that the writer uses for output. Defaults to "UTF-8".</p></li></ul></div><div><p><em>Introduced in DataWeave version 2.2.0.</em></p></div></div></td></tr><tr><td><p>MimeType</p></td><td><div><div><p><code>type MimeType = String</code></p></div></div></td><td><div><div><p>Represents a MIME type, such as <code>application/json</code>.</p></div><div><p><em>Introduced in DataWeave version 2.2.0.</em></p></div></div></td></tr><tr><td><p>Settings</p></td><td><div><div><p><code>type Settings = Object</code></p></div></div></td><td><div><div><p>Reader or writer configuration settings.</p></div><div><p><em>Introduced in DataWeave version 2.2.0.</em></p></div></div></td></tr></tbody></table>
