Filename extensions | .yaml , .yml |
---|---|
Internet media type | application/yaml [1] |
Uniform Type Identifier (UTI) | public.yaml[2] |
Initial release | 11 May 2001 |
Latest release | 1.2 (Revision 1.2.2) 1 October 2021 |
Type of format | Data interchange |
Open format? | Yes |
Website | yaml |
YAML (/ˈjæməl/ ; see § History and name) is a human-readable data serialization language. It is commonly used for configuration files and in applications where data is being stored or transmitted. YAML targets many of the same communications applications as Extensible Markup Language (XML) but has a minimal syntax that intentionally differs from Standard Generalized Markup Language (SGML).[3] It uses Python-style indentation to indicate nesting[3] and does not require quotes around most string values (it also supports JSON style [...]
and {...}
mixed in the same file).[4]
Custom data types are allowed, but YAML natively encodes scalars (such as strings, integers, and floats), lists, and associative arrays (also known as maps, dictionaries or hashes). These data types are based on the Perl programming language, though all commonly used high-level programming languages share very similar concepts.[5][6][7] The colon-centered syntax, used for expressing key-value pairs, is inspired by electronic mail headers as defined in RFC 822, and the document separator ---
is borrowed from MIME (RFC 2046). Escape sequences are reused from C, and whitespace wrapping for multi-line strings is inspired by HTML. Lists and hashes can contain nested lists and hashes, forming a tree structure; arbitrary graphs can be represented using YAML aliases (similar to XML in SOAP).[3] YAML is intended to be read and written in streams, a feature inspired by SAX.[3]
Support for reading and writing YAML is available for many programming languages.[8] Some source-code editors such as Vim,[9] Emacs,[10] and various integrated development environments[11][12][13] have features that make editing YAML easier, such as folding up nested structures or automatically highlighting syntax errors.
The official recommended filename extension for YAML files has been .yaml
since 2006.[14] In 2024, the MIME type application/yaml
has been finalized.[1]