Home > Mobile >  Excuse me the following json expression how to write good
Excuse me the following json expression how to write good

Time:10-04

Excuse me in android is below the first jsno statistics all the formTemp form_name inside inside how much content is not empty data form_value for content, each json formTemp than if the data is change may have names, can can not name next time, and then according to the statistical data show that the json data, if there are three people to fill in the name, just fill in the name of the person only, could you tell me how to write the expression the
{
"Data" : {
"ConfirmllList" : [{
"ProvinceId" : "440000",
"OperId" : "16815671026426847451",
"CreateTime", "the 2019-09-12 11:12:14",
"CityId" : "440300",
"CityName", "shenzhen",
"NotifyId" : "16815671026426847444",
"ProvinceName", "guangdong province",
FormTemp: "[{" form_value \ ": " China \ ", \ "form_name " : \ "name ", \ "form_type " : \ "1 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "2 ", \ "form_name " : \ \ "" big bed room, " form_type \ ": " 2 \ ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 " and \ "form_name " : \ "if need for breakfast ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ \ "0", \ "form_name " : \ "if need lunch ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 " and \ "form_name " : \ "if need dinner ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}] ",
"ActivityId" : "16815671026426847424",
"Ismark" : null,
"UserId" : "16815671026426842810",
"NotifyType" : 2,
"Gender" : 0,
"UserName", "China"
}, {
"ProvinceId" : "440000",
"OperId" : "16815671026426847458",
"CreateTime", "the 2019-09-12 11:13:20",
"CityId" : "440300",
"CityName", "shenzhen",
"NotifyId" : "16815671026426847444",
"ProvinceName", "guangdong province",
"FormTemp" : "[{" form_value \ ": " star \ ", \ "form_name " : \ "name ", \ "form_type " : \ "1 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "3 ", \ "form_name " : \ \ "" big bed room, " form_type \ ": " 2 \ ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need for breakfast ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need lunch ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need dinner ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}] ",
"ActivityId" : "16815671026426847424",
"Ismark" : null,
"UserId" : "16815671026426844030",
"NotifyType" : 2,
"Gender" : 0,
"UserName" : "star"
}, {
"ProvinceId" : "440000",
"OperId" : "16815671026426847500",
"CreateTime", "the 2019-09-12 11:16:04",
"CityId" : "440300",
"CityName", "shenzhen",
"NotifyId" : "16815671026426847444",
"ProvinceName", "guangdong province",
"FormTemp" : "[{" form_value \ ": " hui \ ", \ "form_name " : \ "name ", \ "form_type " : \ "1 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ \ "" big bed room, " form_type \ ": " 2 \ ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need for breakfast ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need lunch ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need dinner ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}] ",
"ActivityId" : "16815671026426847424",
"Ismark" : null,
"UserId" : "16815671026426847404",
"NotifyType" : 2,
"Gender" : 0,
"UserName" : "hui"
}, {
"ProvinceId" : "440000",
"OperId" : "16815671026426847513",
"CreateTime", "the 2019-09-12 11:17:26",
"CityId" : "440300",
"CityName", "shenzhen",
"NotifyId" : "16815671026426847444",
"ProvinceName", "guangdong province",
"FormTemp" : "[{" form_value \ ": " bright \ ", \ "form_name " : \ "name ", \ "form_type " : \ "1 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ \ "" big bed room, " form_type \ ": " 2 \ ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need for breakfast ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need lunch ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}, {\ "form_value " : \ "1 ", \ "form_name " : \ "if need dinner ", \ "form_type " : \ "3 ", \ "verified " : \ \ "1"}] ",
"ActivityId" : "16815671026426847424",
"Ismark" : null,
"UserId" : "16815671026426842829",
"NotifyType" : 2,
"Gender" : 0,
"UserName" : "bright"
}]
}
}

CodePudding user response:

Although didn't understand what you want to express meaning, but generally use a for loop to extract the values formTemp inside to determine

CodePudding user response:

Don't you parse the json but to directly display

CodePudding user response:

Know Gson, put all the form_name formTemp is not null objects in the list, the list is needless to say, how to display the list

CodePudding user response:

Directly using the JSONObject and JSONArray filtering line ah, this have what difficult?
  • Related