I have a JSON
string, say a name and a Url . I need to extract name into the TextView
and extract and display image in ImageView
.
Belo
You can use GSON
library to parse the json into a plain Java Object and then use that object to fill in the TextView and ImageView. If you don't want to use external libraries you can use JSON classes like this:
JSONObject object = new JSONObject("your strnig");
JSONObject webimages = object.getJSONObject("WebImages");
String imageName = webimages.getString("image_name")
String imageUrl = webimages.getString("imageurl")