I would like to parse data from JSON which is of type String
.
I am using Google Gson.
I have:
jsonLine = \"
{
\"data\": {
\"translati
You can create corresponding java classes for the json objects. The integer, string values can be mapped as is. Json can be parsed like this-
Gson gson = new GsonBuilder().create();
Response r = gson.fromJson(jsonString, Response.class);
Here is an example- http://rowsandcolumns.blogspot.com/2013/02/url-encode-http-get-solr-request-and.html