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 the Text Plain format.

Reader Properties

There are no reader properties for Text Plain data.

Writer Properties

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

Parameter Type Default Description

bufferSize

Number

8192

Size of the writer buffer.

deferred

Boolean

false

When set to true, DataWeave generates the output as a data stream, and the script’s execution is deferred until it is consumed. Valid values are true or false.

encoding

String

null

Encoding for the writer to use.

Supported MIME Types

The Text Plain format supports the following MIME types.

MIME Type

text/plain