Say I have a json array that looks like this:
[
{
"Name": "test",
"Val": "test_val"
},
{
"Name": "test2",
"Val": "test_val2"
}
]
I want to convert this into a vector of structs:
struct Test {
string Name;
string Val;
};
I know about the json.get<>()
method, but do not know how to apply that to this.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…