In the below example, how to take the name
and balance
?
{
"user": {
"Name": "John",
"Balance": "2000.53"
}
}
Easy.
rapidjson::Document doc;
doc.Parse(str);
const Value& user = doc["user"];
string name = user["Name"].GetString();
string balance = user["Balance"].GetString();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With