【发布时间】:2013-06-05 10:59:54
【问题描述】:
我正在尝试解析下面的 JSONString
[[{"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());
}
有人可以帮忙吗,我的代码不起作用? 我想解析标题、公司名称、类别等...
【问题讨论】:
-
字符串不是有效的 json
-
我已将您的 json 字符串放入 jsonviewer.stack.hu 并显示有效的 json..
标签: java android json android-layout android-intent