YAML

YAML
Filename extensions.yaml, .yml
Internet media typeapplication/yaml[1]
Uniform Type Identifier (UTI)public.yaml[2]
Initial release11 May 2001 (2001-05-11)
Latest release
1.2 (Revision 1.2.2)
1 October 2021 (2021-10-01)
Type of formatData interchange
Open format?Yes
Websiteyaml.org

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 are 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]

  1. ^ a b Polli, Roberto; Wilde, Erik; Aro, Eemeli (2024-02-21). YAML Media Type (Report). Internet Engineering Task Force. Archived from the original on 2024-02-21. Retrieved 2024-02-21.
  2. ^ "yaml". Apple Developer Documentation: Uniform Type Identifiers. Apple Inc. Archived from the original on 2023-05-22. Retrieved 2023-05-22.
  3. ^ a b c d "Yet Another Markup Language (YAML) 1.0 / Working Draft". 10 Dec 2001. Archived from the original on 2019-07-10. Retrieved 2019-05-28.
  4. ^ "YAML Ain't Markup Language (YAML) Version 1.2". YAML.org. Archived from the original on 2019-01-24. Retrieved 2019-05-29.
  5. ^ "Built-in Types — Python 3.9.6 documentation". docs.python.org. Archived from the original on 2020-06-14. Retrieved 2021-08-19.
  6. ^ "Standard built-in objects - JavaScript | MDN". developer.mozilla.org. Archived from the original on 2021-01-19. Retrieved 2021-08-19.
  7. ^ corob-msft (17 August 2021). "Built-in types (C++)". docs.microsoft.com. Archived from the original on 2024-06-13. Retrieved 2021-08-19.
  8. ^ "The Official YAML Web Site". yaml.org. Archived from the original on 2021-03-18. Retrieved 2019-02-05.
  9. ^ "Setting up Vim for YAML editing". arthurkoziel.com. Archived from the original on 2021-11-23. Retrieved 2021-12-20.
  10. ^ "Yaml Mode". EmacsWiki. 2015-06-12. Archived from the original on 2016-11-08. Retrieved 2016-12-05.
  11. ^ aukaost. "Pretty YAML - Packages - Package Control". Packagecontrol.io. Archived from the original on 2016-11-08. Retrieved 2016-12-05.
  12. ^ "yaml | Eclipse Plugins, Bundles and Products - Eclipse Marketplace". Marketplace.eclipse.org. Archived from the original on 2016-11-08. Retrieved 2016-12-05.
  13. ^ Ruth Kusterer. "NetBeans IDE - Ruby and Ruby on Rails Development". Netbeans.org. Archived from the original on 2016-11-19. Retrieved 2016-12-05.
  14. ^ "YAML Ain't Markup Language". September 24, 2006. Archived from the original on 2006-09-24.

© MMXXIII Rich X Search. We shall prevail. All rights reserved. Rich X Search