Comments supported by YAML

Single Line Comment

  • Denoted by # sign
  • Every thing after # on that line is consider a comment

 

 

Multi Line Comment

  • Regrettably, YAML does not provide direct support for referencing multiple line remarks; however, there is a solution. which requires the inclusion of a hash symbol at the beginning of each line

 

 

whenever you're trying to parse a YAML file into a JSON format, then all your comments present inside your YAML file are going to be ignored by the JSON format.

 


Related Question