我有這樣的JSON響應。我嘗試了很多,但無法解析值。無法解析JSON響應
這一個是我的實際響應...
{"ResponseCode":"000","ResponseDescription":"Successful","SystemServiceID":["0000"],"SystemServiceName":["Test"],"ProductID":["000"],"ProductName":["Test"],"ProductDescription":["Test product"],"MinimumValue":[10000],"MaximumValue":[500000],"ImageURL":[null],"Country":["AAAA"],"CompanyID":["1"],"CompanyName":["Test"],"FieldLevel":["2"],"FieldInfo":["{\"Field1\":{\"Field Name\":\"Phone Number\",\"Field Type\":\"Number\",\"Validation\":{\"Min\":\"4\",\"Max\":\"8\"}},\"Field2\":{\"Field Name\":\"Email\",\"Field Type\":\"String\",\"Validation\":{\"Regular Expression\":\"abcd\",\"Min Length\":\"10\",\"Max Length\":\"20\"}}}"]}
出於此,我能夠解析所有領域想到下面一個...
{
"Field1":
{
"Field Name":"Phone Number",
"Field Type":"Number",
"Validation":{"Min":"4","Max":"8"}
},
"Field2":
{
"Field Name":"Email",
"Field Type":"String",
"Validation":{"Regular Expression":"abcd","Min Length":"10","Max Length":"20"}
}
}
我也想取這個字段的值爲Validation":{"Min":"4","Max":"8"}
.Like最大值爲4,最小值爲8.
任何幫助將不勝感激。
在此先感謝... :)
慈祥發佈我們的代碼 – KOTIOS
如果可能的話logcat – KOTIOS
我希望你的真實回覆中沒有文件名中的換行符。這會打破它。 – rekire