I have this Json statement :
{name=Adam Schmidt, id=43}
and I want to extract the value of the name, trying this code but it didn't work
// parse json data
try {
JSONObject userObject = new JSONObject(result);
userName = userObject.getString("name");
tvName.setText(userName);
} catch (Exception ex) {
ex.printStackTrace();
}