netzpirat/codo — pull request #117 by pwnall (2013-07-02 06:24:37+00:00)
Title: Partial implementation of a YAML theme

This is a work-in-progress for having YAML output.

I ended up settling on YAML instead of JSON because JSON is picky about colons-as-separators, and I couldn't find any good support for that kind of output in the JavaScript template libraries that I have tried.

The YAML theme isn't complete, but the non-theme code changes should be complete, so this is a good idea of what the change would end up looking like.

Also, it was tempting to give up and write a Generator that outputs JSON. The main advantage to having a theme, in my opinion, is that the output structure can be easily preserved if codo's internal structures change.

What do you think about this approach?