Supported data formats

Ballerina supports the data formats listed below.

Data formatDescriptionDocumentation
JSONBallerina 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.
XMLBallerina 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.
YAMLBallerina 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.
TOMLBallerina facilitates working with content in TOML format with support for parsing TOML content as JSON objects and writing TOML content to files.
CSVBallerina 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.
TSVBallerina facilitates working with data in TSV format with support for parsing and writing TSV data along with streaming.
ProtobufBallerina supports serializing and deserializing Protobuf messages sent/received via the gRPC protocol.
EDIBallerina 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.
FHIRBallerina 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.
HL7Ballerina 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.
Previous