How can I parse this json in an android project?
{"code":200,"lang":"en-ru","**text**":["Лучше поздно, чем никогда"]}
I need only a part of "**text**":["Лучше поздно, чем никогда"]
How can I parse this json in an android project?
{"code":200,"lang":"en-ru","**text**":["Лучше поздно, чем никогда"]}
I need only a part of "**text**":["Лучше поздно, чем никогда"]
JSONObject jObj = new JSONObject("{"code":200,"lang":"en-ru","text":"Лучше поздно, чем никогда"}");
String text = jObj.optString("text");
Check those links to understand the concept of JSON serialization/de-serialization
http://www.javacodegeeks.com/2013/10/android-json-tutorial-create-and-parse-json-data.html
http://www.vogella.com/tutorials/AndroidJSON/article.html
And here are the 2 most famous library for handling JSON:
GSON
https://sites.google.com/site/gson/gson-user-guide
&
Jackson