我試圖解析以下JSONString如何解析JSON字符串的Android
[[{"0":"
","title":" Technical Support Analyst in Noida","1":"
","Company Name":" Oracle","2":"
","Category":"Fresher","3":"
","Job Type":"Full Time","4":"
","Location":"Noida","5":"
","Job Qualification":"BE\/BTch\/Bsc\/Others","6":"
","Job Experience":"Freshers","7":"
","Job postdate":"2013-6-05","8":"
"}]]
這裏我的代碼:
// try parse the string to a JSON object
try {
//jObj = new JSONObject(JsonString);
JSONArray ja = new JSONArray(result);
int size = ja.length();
Log.d("tag", "No of Elements " + ja.length());
} catch (JSONException e) {
Log.e("JSON Parser", "Error parsing data " + e.toString());
}
可以在任何一個幫助,我的代碼不能正常工作? 我想分析標題,公司名稱,類別等等...
參閱此http:// stackoverflow.com/questions/9605913/how-to-parse-json-in-android – Riser
字符串不是一個有效的json – Blackbelt
http://stackoverflow.com/questions/8091051/how-to-parse-json-string-in-android和http://stackoverflow.com/questions/3408985/json-array -iteration-in-android-java – Sam