Declare formatter functions as static.
Support formatter initialisation functions and private data.
Support formatter destructor.
Use size_t for lengths.
Add json formatter (via yajl library).
Switch records to use a typed data structure.
Comment record structure.