YAML - YAML Ain't Markup Language Tips

YAML is “a human readable data-serialization language.” Or in other words, it’s a way to format information so that people and machines can read it.

It’s used in plotman and SWAR in their configuration files.

Here are some tips (and share others if you have them):

  • If your configuration file is throwing errors when you try to run swar/plotman, it’s possible you used a tab instead of spaces. YAML is sensitive to this. If in doubt, start from a fresh config file.
  • You can check if your YAML configuration file is properly formatted by pasting in the text into this site: http://www.yamllint.com/
2 Likes

Yes that is a great tool, i was having some trouble with that as well and the yaml checker was great to sort it out.

Also: get something like notepad++, makes life easier

Only tangentially related, but I enjoyed this blog post about one of gotcha’s of YAML: The Norway Problem - why StrictYAML refuses to do implicit typing and so should you - HitchDev

1 Like

I use VS Code in Windows and it automatically supports YAML files. Free install, very versatile editor!

1 Like