Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
YAML
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{short description|Human-readable data serialization format}} {{for|the CSS framework|YAML (framework)}} {{Infobox file format | name = YAML | icon = Official YAML Logo.svg | iconcaption = | icon_size = | screenshot = | screenshot_size = | caption = | _noextcode = on | extensions = {{code|.yaml}}, {{code|.yml}} | _nomimecode = on | mime = {{code|application/yaml}}<ref name="rfc9512">{{Cite report |url=https://datatracker.ietf.org/doc/rfc9512/ |title=YAML Media Type |last=Polli |first=Roberto |last2=Wilde |first2=Erik |date=2024-02-21 |publisher=Internet Engineering Task Force |issue=RFC 9512 |last3=Aro |first3=Eemeli |access-date=2024-02-21 |archive-date=2024-02-21 |archive-url=https://web.archive.org/web/20240221185855/https://datatracker.ietf.org/doc/rfc9512/ |url-status=live }}</ref> | type_code = | uniform_type = public.yaml<ref>{{cite web |url=https://developer.apple.com/documentation/uniformtypeidentifiers/uttype/3551604-yaml |title=yaml |work=Apple Developer Documentation: Uniform Type Identifiers |publisher=[[Apple Inc]] |access-date=2023-05-22 |archive-date=2023-05-22 |archive-url=https://web.archive.org/web/20230522155815/https://developer.apple.com/documentation/uniformtypeidentifiers/uttype/3551604-yaml |url-status=live }}</ref> | conforms_to = | magic = | developer = | released = {{start date and age|2001|05|11|df=yes}} | latest_release_version = 1.2 (Revision 1.2.2) | latest_release_date = {{start date and age|2021|10|01|df=yes}} | genre = Data interchange | container_for = | extended_from = | extended_to = | standard = <!-- or: | standards = --> | open = Yes | url = {{URL|https://yaml.org}} }} '''YAML''' ({{IPAc-en|'|j|æ|m|ə|l|audio=en-us-YAML.oga}} {{respell|YAM|uhl}}) is a [[human-readable]] [[data serialization language]]. It is commonly used for [[configuration file]]s 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).<ref name="1.0" /> It uses [[Python (programming language)|Python]]-style indentation to indicate nesting<ref name="1.0">{{cite web|url=https://yaml.org/spec/history/2001-12-10.html|title=Yet Another Markup Language (YAML) 1.0 / Working Draft|date=10 Dec 2001|access-date=2019-05-28|archive-date=2019-07-10|archive-url=https://web.archive.org/web/20190710131145/https://yaml.org/spec/history/2001-12-10.html|url-status=live}}</ref> and does not require quotes around most string values (it also supports [[JSON]] style {{code|[...]}} and <code>{...}</code> mixed in the same file).<ref name="YAML Version 1.2">{{cite web|url=https://yaml.org/spec/1.2/spec.html|title=YAML Ain't Markup Language (YAML) Version 1.2|website=YAML.org|access-date=2019-05-29|archive-date=2019-01-24|archive-url=https://web.archive.org/web/20190124222648/https://yaml.org/spec/1.2/spec.html|url-status=live}}</ref> Custom data types are allowed, but YAML natively encodes [[Scalar (computing)|scalars]] (such as [[String (computer science)|strings]], [[Integer (computer science)|integers]], and [[Floating point|floats]]), [[List (computing)|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.<ref>{{Cite web|title=Built-in Types — Python 3.9.6 documentation|url=https://docs.python.org/3/library/stdtypes.html|access-date=2021-08-19|website=docs.python.org|archive-date=2020-06-14|archive-url=https://web.archive.org/web/20200614194325/https://docs.python.org/3/library/stdtypes.html|url-status=live}}</ref><ref>{{Cite web|title=Standard built-in objects - JavaScript {{!}} MDN|url=https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects|access-date=2021-08-19|website=developer.mozilla.org|language=en-US|archive-date=2021-01-19|archive-url=https://web.archive.org/web/20210119075018/https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects|url-status=live}}</ref><ref>{{Cite web|last=corob-msft|title=Built-in types (C++)|url=https://docs.microsoft.com/en-us/cpp/cpp/fundamental-types-cpp|access-date=2021-08-19|website=docs.microsoft.com|date=17 August 2021|language=en-us|archive-date=2024-06-13|archive-url=https://web.archive.org/web/20240613135924/https://learn.microsoft.com/en-us/cpp/cpp/fundamental-types-cpp?view=msvc-170|url-status=live}}</ref> The colon-centered syntax, used for expressing [[Attribute–value pair|key-value pair]]s, is inspired by [[electronic mail]] headers as defined in {{IETF RFC|0822}}, and the [[Delimiter|document separator]] {{code|---}} is borrowed from [[MIME]] ({{IETF RFC|2046}}). [[Escape sequences]] are reused from [[C (programming language)|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 [[Graph (abstract data type)|graphs]] can be represented using YAML aliases (similar to XML in [[SOAP]]).<ref name="1.0" /> YAML is intended to be read and written in streams, a feature inspired by [[Simple API for XML|SAX]].<ref name="1.0" /> Support for reading and writing YAML is available for many programming languages.<ref>{{Cite web|url=https://yaml.org/|title=The Official YAML Web Site|website=yaml.org|access-date=2019-02-05|archive-date=2021-03-18|archive-url=https://web.archive.org/web/20210318102345/https://yaml.org/|url-status=live}}</ref> Some source-code editors such as [[Vim (text editor)|Vim]],<ref>{{cite web|url=https://www.arthurkoziel.com/setting-up-vim-for-yaml/|title=Setting up Vim for YAML editing|website=arthurkoziel.com|access-date=2021-12-20|archive-date=2021-11-23|archive-url=https://web.archive.org/web/20211123022602/https://www.arthurkoziel.com/setting-up-vim-for-yaml/|url-status=live}}</ref> [[Emacs]],<ref>{{cite web |url=https://www.emacswiki.org/emacs/YamlMode |title=Yaml Mode |publisher=EmacsWiki |date=2015-06-12 |access-date=2016-12-05 |archive-date=2016-11-08 |archive-url=https://web.archive.org/web/20161108052715/https://www.emacswiki.org/emacs/YamlMode |url-status=live }}</ref> and various [[integrated development environment]]s<ref>{{cite web |author=aukaost |url=https://packagecontrol.io/packages/Pretty%20YAML |title=Pretty YAML - Packages - Package Control |publisher=Packagecontrol.io |access-date=2016-12-05 |archive-date=2016-11-08 |archive-url=https://web.archive.org/web/20161108052511/https://packagecontrol.io/packages/Pretty%20YAML |url-status=live }}</ref><ref>{{cite web |url=https://marketplace.eclipse.org/category/free-tagging/yaml |title=yaml | Eclipse Plugins, Bundles and Products - Eclipse Marketplace |publisher=Marketplace.eclipse.org |access-date=2016-12-05 |archive-date=2016-11-08 |archive-url=https://web.archive.org/web/20161108133326/https://marketplace.eclipse.org/category/free-tagging/yaml |url-status=live }}</ref><ref>{{cite web |author=Ruth Kusterer |url=https://netbeans.org/features/ruby/index.html |title=NetBeans IDE - Ruby and Ruby on Rails Development |publisher=Netbeans.org |access-date=2016-12-05 |archive-date=2016-11-19 |archive-url=https://web.archive.org/web/20161119003539/https://netbeans.org/features/ruby/index.html |url-status=dead }}</ref> 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 {{code|.yaml}} since 2006.<ref>{{Cite web|url=https://yaml.org/faq.html|title=YAML Ain't Markup Language|date=September 24, 2006|archive-url=https://web.archive.org/web/20060924190202/https://yaml.org/faq.html|archive-date=2006-09-24|url-status=live}}</ref> In 2024, the [[MIME type]] {{code|application/yaml}} has been finalized.<ref name="rfc9512"/>
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)