-
paticualr string
QString str = "{“resultâ€:0,“command†: “frontend_get_infoâ€,“commandIdâ €:0,“bitErrorRateâ€:0,“noiseR atioâ€:28,“errorâ€: “xxxâ€,“lockStatusâ€: “lockâ€}";
i want to get only value 28 from string ....
how can i get plz give some solution with code
-
Re: paticualr string
This looks like JSON so use appropriate API.
-
Re: paticualr string
-
Re: paticualr string
Hi, you can use QString::split to split the string at the comma, the iterate over the resulting QStringList and check for the key you are looking for, e.g. “noiseRatioâ€.
Although a real JSON API would probably be easier to use and more versatile.
Ginsengelf