This module contains what is required for registering a new data format for the DataWeave language.
For an example, see Custom Data Formats Example.
Types
DataFormat
Represents the DataFormat definition.
Definition
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
{ /**
* True if this is data format is represented in a binary representation instead of text, if not present is false
**/
binaryFormat?: Boolean, /**
* The default charset of this format, if any.
**/
defaultCharset?: String, /**
* Returns the list of file extensions with the . (".json", ".xml", etc...) that should be assigned to this Data Format
**/
fileExtensions?: Array<String>, /**
* The list of MimeTypes that are accepted
**/
acceptedMimeTypes: Array<MimeType>, /**
* This function will be in charge of reading the raw content and transform it into the DW canonical model
**/
reader: (content: Binary, charset: String, settings: ReaderSettings) -> Any, /**
* This function will be in charge of writing the DW canonical model into Binary content
**/
writer: (value: Any, settings: WriterSettings) -> Binary }
EmptySettings
Represents a configuration with no Settings.
Definition
1
Object
EncodingSettings
Represents an Encoding Settings.
Definition
1
2
3
4
{ /**
* Encoding to be used by this writer.
**/
encoding?: String }
MimeType
Represents a MimeType, such as application/json
.
Definition
1
String
Settings
Represents reader or writer configuration Settings.
Definition
1
Object