Monday, April 15, 2019

Parsing and validating YAML

For anyone who is looking for ways to validate YAML files, there are multiple modules out there for python, ruby and perl.

If using pip then you can install yamllint program:
 pip install yamllint

and then do 
yamllint blah.yml

in Ruby you could do:
ruby -ryaml -e "p YAML.load("< data.yaml