What is YAML

YAML ain't markup language. YAML is a concise data serialization language, which is typically considered easier to read than the more verbose JSON or XML. It is most often used in configuration files of servers and software applications. Clark Evans proposed the spec in 2001 as the result of an effort to simplify XML. According to his resume, at the time he conceived of YAML he was working with Python, which likely influenced the syntax of YAML as an indentation-based language.

Advantages of YAML

  • Concise syntax eliminates many syntax errors common in other markup languages, such as missing closing brackets
  • YAML allows users to add comments to their data, which can be useful for documentation or explaining certain parts of the data. JSON does not support comments, so any comments added to a JSON file would be treated as part of the data.
  • YAML allows easy reuse of redundant configuration simply by creating a named anchor with an "&" and referencing with "*"
  • YAML allows users to include multiple documents within a single file, separated by '---'. This can be useful for organizing data or separating different sections of a configuration file.
  • A less commonly used advantage is that YAML allows custom data typing, when the core or advanced data types are insufficient

About YAML Checker

YAML checker aims to be the YAML validator of choice for developers. The tool provides a simple interface to input YAML content (just copy + paste!), view your content with syntax highlighting, and instantly display any issues with your YAML along with a line number causing the problem. Once you have fixed your YAML, the validator will instantly update to indicate that your input is free of errors with a green success message.

YAML Alternatives

  • JSON (JavaScript Object Notation)
  • TOML (A minimal configuration file format)
  • JSON5 (A proposed extension to JSON)
  • BSON (Binary JSON)
  • XML (Extensible Markup Language)
  • CSON (CoffeeScript Object Notation)
  • CSV (Comma Separated Values)
  • Protocol Buffers
  • MessagePack (An efficient binary serialization format)