Hello,
I have a struct looking like this
struct Something {
map: HashMap<A, B>,
integer: u32,
}
A
and B
are other structs for which I derived serde::Serialize
and serde::Deserialize
.
However, I can't convert that to json since keys of map
are not strings. Is there a data format that would allow me to do that? If not, is there a trick with serde
(or other library) to easily convert map
to a list of pairs or something like that.
In the end, I don't care how the data are saved and loaded. I just want to be able to do it.