Unlike lists, this isn't mutated for maps because there's no
intermediate builder object being used for maps (lists are assembled
with an ArrayList, after which they are converted to plain slices).
this works a lot better than the very bad dump function I had before.
The output isn't pretty printed but can easily be made so by piping it
to jq, for example.
handroll some libyaml bindings.
I was originally going to use yaml-cpp, but C++ sucks tremendously and
looking at the libyaml documentation, the event-based parser API
probably works the way I want it to so let's try it out.