I have JSON like this:
{
"fieldNames": ["MyInt", "MyFloat", "MyString"],
"fieldValues": [5, 10.0, "hello"],
}
I want to deserialize into a struct like this:
#[derive(Deserialize)]
struct MyStruct {
my_int: u64,
my_float: f64,
my_string: String,
}
Is there a way to do this with serde? Ideally I would want something like:
#[serde(keys="fieldNames", values="fieldValues")]