Ballerina supports the data formats listed below.
Data format | Description | Documentation |
---|---|---|
JSON | Ballerina knows JSON: JSON syntax is compatible with Ballerina and every JSON value has a natural representation. Working with JSON in Ballerina is intuitive, safe, and convenient with features such as the json type, intuitive syntax for JSON navigation, lax static typing for JSON, support for converting between JSON and user-defined types, etc. | |
XML | Ballerina knows XML: XML syntax is compatible with Ballerina and supports compile-time validation for content that occurs in an XML value. Working with XML in Ballerina is intuitive and convenient with features such as the xml type, intuitive syntax for XML navigation, namespaces, support for converting between XML and JSON or user-defined types, etc. | |
YAML | Ballerina facilitates working with content in YAML format with support for parsing YAML content as JSON and writing YAML content to files, along with features such as streaming and support for custom types. | |
TOML | Ballerina facilitates working with content in TOML format with support for parsing TOML content as JSON objects and writing TOML content to files. | |
CSV | Ballerina facilitates working with data in CSV format with support for parsing and writing CSV data along with support for reading/writing data as user-defined types and streaming. | |
TSV | Ballerina facilitates working with data in TSV format with support for parsing and writing TSV data along with streaming. | |
Protobuf | Ballerina supports serializing and deserializing Protobuf messages sent/received via the gRPC protocol. | |
EDI | Ballerina facilitates B2B integration with support for EDI standards, including support for parsing EDI data as JSON or records and converting JSON or records to EDI text against a specific schema. | |
FHIR | Ballerina facilitates the development of healthcare applications with built-in support to process FHIR (Fast Healthcare Interoperability Resources) resources, including support for conversion between FHIR JSON messages and records. | |
HL7 | Ballerina enables healthcare information exchange between different systems with support for the HL7 messaging standard, including parsing HL7 messages as Ballerina values, encoding to wire format, and exchanging data. |