json-ified the various structs