Difference between revisions of "Yaml"

From Freephile Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
I learned it when it was first introduced in 2001 so at that time it was known as "Yet Another Markup Language", however the acronym later became a recursive backcronym standing for "'''YAML Ain't Markup Language'''". So, what is it then? Well, it's a data serialization format. It is a superset of JSON, which means that any valid JSON is valid YAML.
 
I learned it when it was first introduced in 2001 so at that time it was known as "Yet Another Markup Language", however the acronym later became a recursive backcronym standing for "'''YAML Ain't Markup Language'''". So, what is it then? Well, it's a data serialization format. It is a superset of JSON, which means that any valid JSON is valid YAML.
  
YAML is used everywhere, such as the [[Ansible]] project. Refer to [https://docs.ansible.com/ansible/latest/reference_appendices/YAMLSyntax.html Ansible reference appendices YAML Syntax]. If you want to use Ansible, learning YAML first will help you tremendously.
+
YAML is used everywhere, such as the '''[[Ansible]]''' project. If you want to use Ansible, learning YAML first will help you tremendously. If you're ready to jump in, see [https://docs.ansible.com/ansible/latest/playbook_guide/playbooks.html#working-with-playbooks Working with Playbooks] in the Ansible docs.
  
 
==Resources==
 
==Resources==
Line 16: Line 16:
 
https://www.xkyle.com/A-Detailed-Comparison-of-YAML-Formatters/
 
https://www.xkyle.com/A-Detailed-Comparison-of-YAML-Formatters/
  
=== Websites ===
+
===Tools===
'''<code>yamllint</code>''' https://github.com/adrienverge/yamllint GPL3
+
'''<code>yamllint</code>''' https://github.com/adrienverge/yamllint GPL3  
  
=== Docs ===
+
For more on '''Syntax''' rules and examples; plus linting your YAML, see [[yamllint]]
https://github.com/adrienverge/yamllint
 
<br />
 
  
== Snippets ==
+
==Snippets==
 
<syntaxhighlight lang="yaml+jinja">
 
<syntaxhighlight lang="yaml+jinja">
 
# This file IS valid YAML because the Jinja is in a YAML comment
 
# This file IS valid YAML because the Jinja is in a YAML comment

Latest revision as of 10:45, 1 November 2024

Official YAML Logo.svg

See wp:YAML

I learned it when it was first introduced in 2001 so at that time it was known as "Yet Another Markup Language", however the acronym later became a recursive backcronym standing for "YAML Ain't Markup Language". So, what is it then? Well, it's a data serialization format. It is a superset of JSON, which means that any valid JSON is valid YAML.

YAML is used everywhere, such as the Ansible project. If you want to use Ansible, learning YAML first will help you tremendously. If you're ready to jump in, see Working with Playbooks in the Ansible docs.

Resources[edit | edit source]

10 Tips by RedHat

10 Things you might not know about YAML

https://www.xkyle.com/A-Detailed-Comparison-of-YAML-Formatters/

Tools[edit | edit source]

yamllint https://github.com/adrienverge/yamllint GPL3

For more on Syntax rules and examples; plus linting your YAML, see yamllint

Snippets[edit | edit source]

# This file IS valid YAML because the Jinja is in a YAML comment
# {% if extra_info %}
key1: value1
# {% endif %}
key2: value2