---
schema_version: "1"
id: 0f311c0e964911c0ec1277e8bfa4510f5e8463584e2abe6d0fb30e5f1b540c2c
title: Text Java Properties Format
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.3/dataweave-formats-properties.md
canonical_url: https://docs.mulesoft.com/dataweave/2.3/dataweave-formats-properties
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 94c15852dce9b95d0b4877cc09662edf47c7e96f551bb3965c2c10c0c6002ac2
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
---
product: DataWeave
version: 2.3
---

# Text Java Properties Format

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

MIME Type: `text/x-java-properties`

ID: `properties`

The Text Java Properties format parses any Java properties file. This format represents simple
key-value pairs. DataWeave represents these pairs as an object with string values.

## Example: Represent a properties File in the DataWeave Format (dw)

This example shows how DataWeave represents a properties file.

### Input

The following `text/x-java-properties` data is from a properties file. The file contains key-value
pairs that provide host and port values. This content serves as the input payload to the DataWeaave
script.

```properties
host=localhost
port=1234
```

### Source

The DataWeave script transforms the `text/x-java-properties` input payload to the DataWeave (dw)
format and MIME type. It returns a string.

```dataweave
%dw 2.0
output application/dw
---
payload
```

### Output

The output is an object in the DataWeave (dw) format. The object contains a collection of key-value
pairs that match the `text/x-java-properties` input. Notice that the output wraps the values in
quotation marks.

```dataweave
{
    host: "localhost",
    port: "1234"
}
```

## Configuration Properties

DataWeave supports the following configuration properties for the Text Java Properties format.

### Reader Properties

There are no reader properties for this format.

### Writer Properties

The Text Java Properties format accepts properties that provide instructions for writing output
data.

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><p><code>bufferSize</code></p></td><td><p><code>Number</code></p></td><td><p><code>8192</code></p></td><td><div><div><p>Size of the writer buffer.</p></div></div></td></tr><tr><td><p><code>deferred</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>false</code></p></td><td><div><div><p>When set to <code>true</code>, DataWeave generates the output as a data stream, and the script’s execution is deferred until it is consumed. Valid values are <code>true</code> or <code>false</code>.</p></div></div></td></tr><tr><td><p><code>encoding</code></p></td><td><p><code>String</code></p></td><td><p><code>null</code></p></td><td><div><div><p>Encoding for the writer to use.</p></div></div></td></tr></tbody></table>

## Supported MIME Types

The Java Properties format supports the following MIME types.

<table><colgroup><col></colgroup><thead><tr><th>MIME Type</th></tr></thead><tbody><tr><td><p><code>*/x-java-properties</code></p></td></tr><tr><td><p><code>*/properties</code></p></td></tr></tbody></table>
