Contact Us 1-800-596-4880

Text Plain Format

MIME type: text/plain

ID: text

The Text Plain format represents text as a string.

Note that DataWeave parses, encodes, and stores this format into RAM memory.

Example

This example shows how DataWeave represents Text Plain data.

Input

The Plain Text data serves as the input payload to the DataWeave source.

This is text plain

Source

The DataWeave script transforms the Text PLain input payload to the DataWeave (dw) format and MIME type. It returns a string.

output application/dw
---
payload

Output

Because the DataWeave (dw) output is a string, it is wrapped in quotation marks.

"This is text plain"

Configuration Properties

DataWeave supports the following configuration properties for this format.

Reader Properties

There are no reader properties for this format.

Writer Properties

This format accepts properties that provide instructions for writing output data.

Parameter Type Default Description

bufferSize

Number

8192

Size of the buffer writer, in bytes. The value must be greater than 8.

deferred

Boolean

false

Generates the output as a data stream when set to true, and defers the script’s execution until the generated content is consumed.

Valid values are true or false.

encoding

String

null

The encoding to use for the output, such as UTF-8.

Supported MIME Types

This format supports the following MIME types.

MIME Type

text/plain