I would like to parse data from JSON which is of type String. I am using Google Gson.
String
I have:
jsonLine = \" { \"data\": { \"translati
One line code:
System.out.println(new Gson().fromJson(jsonLine,JsonObject.class).getAsJsonObject().get("data").getAsJsonObject().get("translations").getAsJsonArray().get(0).getAsJsonObject().get("translatedText").getAsString());