{"1": {
"StoreName": "イオン八千代緑が丘店",
"StoreTel": "047-480-3660",
"StoreAddress": "〒276-0049 千葉県八千代市緑ヶ丘2-1-3 2F",
"WorkingTimeInNormalDay": "7:30 AM - 9:00PM",
"WorkingTimeInWeekend": "9:00-22:00",
"HaveKidProduct": "N"
}}
i want to read this json:
JSONObject json ,jChild;
JSONArray jsonNames, jsonValues;
JSONArray jChildNames,jChildValues;
json = new JSONObject(resultString);
jsonNames = json.names();
jsonValues = json.toJSONArray(jsonNames);
for (int i = 0; i < jsonNames.length(); i++) {
jChild = jsonValues.getJSONObject(i);
jChildNames = jChild.names();
jChildValues = jChild.toJSONArray(jChildNames);
Log.i(getCallingPackage(), "No : " + jsonNames.getString(i));
for (int j = 0; j < jChildNames.length(); j++){
Log.i(getCallingPackage(),jChildNames.getString(j) + " : " + jChildValues.getString(j).trim());
}
}
}
There problems here is: When i parse this:
"WorkingTimeInNormalDay": "7:30 AM - 9:00PM", i have
jChildValues.getString(j) return "7" not "7:30 AM - 9:00PM"
i think may be ":" character is the root cause
How can i solve this problems?
Thanks
===========
Edited:
This is my mistake
Everything working like a champ
"7:30 AM - 9:00PM"shouldn't be causing any problem as its enclosed within double quotes