How to add Comments in YAML?

Category: YAMLHow to add Comments in YAML?
Editor">Editor Staff asked 2 years ago

How to add Comments in YAML?

1 Answers
Editor">Editor Staff answered 2 years ago
  • An explicit comment is denoted b the syntax #.
  • Comments are separated from other tokens wit white spaces.
  • Comment lines appear independently outside of scalar content and only white space character is considered to be a comment line

# This is a comment
Multi-line comments

  • YAML doesn’t support multi-line comments, but you can write comments in multiple lines. Example:

# this comment# is written in# multiple lines