3 ms·
I think what OP means is a layer in a sense of mapping JSON to your own data types. You just invoke json.Marshal/Unmarshal here, which deserializes into maps an
by int_19h 10y ago
I think what OP means is a layer in a sense of mapping JSON to your own data types. You just invoke json.Marshal/Unmarshal here, which deserializes into maps and arrays of interface{} - i.e. effectively an untyped data structure.
- majewsky 10y agoNo, it doesn't. json.Un/Marshal understand all data types; you just need to annotate fields in structs with their JSON field names.