Created
September 19, 2015 13:58
-
-
Save dvdfu/3c37e1d3484b3a0e69d4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.david.myapplication; | |
import com.google.gson.Gson; | |
import java.util.List; | |
/** | |
* Created by david on 15-09-19. | |
*/ | |
public class DataWrapper { | |
public Data data; | |
public static DataWrapper fromJson(String s) { | |
return new Gson().fromJson(s, DataWrapper.class); | |
} | |
public String toString() { | |
return new Gson().toJson(this); | |
} | |
} | |
class Data { | |
public List<Translation> translations; | |
} | |
class Translation { | |
public String translatedText; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment