%dw 2.0
import * from dw::module::Mime
output application/json
---
fromString("application/json")
fromString
fromString(mimeType: String): Result<MimeType, MimeTypeError>
Transforms a MIME type string value representation to a MimeType.
Introduced in DataWeave version 2.7.0.
Parameters
| Name | Type | Description |
|---|---|---|
|
String |
The MIME type string value to transform to a |
Example
This example transforms a MIME type string value without parameters to a MimeType value.



