(PDB-712) structured export

Maybe use cheshire/json on this instead of a string? Stylistic mainly, but also if we switch this out in the future for msgpack, one less special case.