Adding a YAML library in VTK

I don’t know that I’d call YAML a “niche” thing these days. However, the lack of use of it in data formats that may be supported by VTK (or even in general within the scivis world?) does not lend towards its inclusion into VTK itself.

One of the main problems here is that because YAML is very flexible, there are numerous “styles” that may make the format “unstable” when writing it out between various tools. This is in contrast to JSON where just about the only flexibility one has is “spaces after :?” and “how much to indent by?”. This is basically a longer way of saying “yes, easily editable by humans, but a pain for machines to edit”. Personally, I feel JSON is pretty close to the middle line on that axis.

In addition to the maintenance burden, YAML is a very complex beast and numerous parsers have had serious security vulnerabilities (though this is mainly due to the dynamic nature of the backing languages in those cases).¹

¹ Yes, I’m aware we have 3 XML parsers in VTK. I’d like to make that 1 at some point, but momentum there is slow.