I am getting a response like this
String result = responseEntity.getBody();
{
"FailureReason": "",
"State": "True",
"UserId": 1038,
"Specified": false,
"Name": "Java"
}
How would i access these JsonString. I am using Gson to form the JsonString. I am JS Guy, when i try to access result.Name [It throws me error]
A good way is to use POJO. Make one
POJOthat represent the response.Use,
This will return object of your POJO type. Then use POJO object’s
gettermethod to fetch whatever value required.