toBinary(str: String, encoding: String): Binary
Transform a String value into a Binary value
using the specified encoding.
Introduced in DataWeave version 2.4.0.
Parameters
| Name | Description |
|---|---|
|
The |
|
The encoding to apply to the |
Example
This example shows how toBinary behaves with different inputs.
It produces output in the application/dw format.