start of re-serialising support
serialise with pretty output