Convert JSON to C structs