JSON parsing using Gson for Java
I would like to parse data from JSON which is of type String.
I am using Google Gson.
I have:
jsonLine = "
{
"data": {
"translations": [
{
"translatedText": "Hello world"
}
]
}
}
";
and my class is:
public class JsonParsing{
public void parse(String jsonLine) {
// there I would like to get String "Hello world"
}
}