Home > Back-end >  JSONCPP how to parse the JSON string C
JSONCPP how to parse the JSON string C

Time:09-26

{
"Type" : 1,
"Success" : true,
"PageSize" : 0,
"Data" : {
"Id" : 0,
"UserNo", "7",
"UserName" : "da Ming lee,"
"UserSex" : "male",
"UserAge" : 40,
"Sbp" : 102,
"Dbp" : 70,
"Abp" : 80,
"Heart" : 61,
"Slope" : 0,
"Intercept" : 466,
"ImgPath" : "http://http://123.56.187.191:81/7.png",
"TestDate" : "2016/3/7 19:37:31"
}
}

Thank you all for the great god

CodePudding user response:

A detailed code, thank you ~ ~ ~

CodePudding user response:

The header file reference.. Slightly
Json: : Value jsQsyt1;
Json: : Reader Reader;
Reader. Parse (sStr) c_str (), jsQsyt1);

AnsiString sType=jsQsyt1 [r]. "the Type" asString ();
Int nID=jsQsyt1 [" Data "] [" Id "] asInt ();
.

CodePudding user response:

Thanks for the second floor, I has been solved, or use JSONCPP
Prev:c
  • Related