how to parse json in blackberry 5?
I try to parse json data in blackberry 5 but i get error that
net.rim.json.org
not found.
This works fine in bb7. what can i do for bb 5. If i cant use that package
means which package should i use.
This is my code
JSONObject NewsList= new JSONObject(response).getJSONObject("NewsList");
JSONArray jArray = NewsList.getJSONArray("News");
for(int i=0;i<jArray.length();i++)
{
JSONObject jObject = jArray.getJSONObject(i);
String articleid = jObject.getString("articleid");
String headline = jObject.getString("headline");
String abstrac = jObject.getString("abstract");
String imgurl = jObject.getString("Articleid");
}
No comments:
Post a Comment