I am trying to deserialize JSON that is received from Web API and has some unnecessarily deep structure.
With serde
, is it possible to deserialize JSON like:
{
"unnecessarily": {
"deep": {
"structure": {
"data1": 0
}
}
},
"data2": 0
}
to rust struct:
struct Data {
data1: usize,
data2: usize,
}
without manually implementing Deserialize
?
If it is impossible, are there any other suitable crates?