Home

YAML

YAML (short for YAML Ain’t Markup Language) is a human-readable data serialization standard commonly used for configuration files and data exchange. It originated as a replacement for XML and JSON in contexts where readability by humans is important. The YAML 1.2 specification is the current standard, and YAML is designed to be a superset of JSON, with JSON documents being valid YAML documents.

YAML uses indentation to denote structure. It represents data as scalars (strings, numbers, booleans, null), sequences

YAML is widely used in software configuration and deployment. It is the format of many configuration files

Cautions: YAML parsing can be sensitive to indentation and syntax, and loading YAML from untrusted sources

(lists),
and
mappings
(dictionaries).
Basic
syntax
relies
on
indentation
and
the
colon
followed
by
a
space
to
map
keys
to
values;
lists
are
introduced
by
a
dash
and
a
space.
YAML
also
supports
flow
notation
with
braces
and
brackets
for
inline
mappings
and
sequences.
In
addition,
it
provides
anchors
and
aliases
using
&
and
*
to
reuse
nodes,
and
block
scalars
introduced
by
|
or
>
for
multi-line
strings.
Comments
begin
with
#.
Tabs
are
not
allowed
for
indentation.
and
is
used
extensively
in
Kubernetes
manifests,
Docker
Compose
files,
and
Ansible
playbooks.
Because
YAML
is
a
data-interchange
format
rather
than
a
programming
language,
it
is
supported
by
libraries
in
most
programming
languages.
can
incur
security
risks
in
some
libraries.
Many
ecosystems
provide
safe-loading
options
to
avoid
arbitrary
code
execution
during
parsing.