[WIP] Add JSON serializer

Targets #151
Argh.