diff options
author | Peter Wu <peter@lekensteyn.nl> | 2014-05-10 17:30:49 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2014-05-10 17:30:49 +0200 |
commit | bb7e2b32ef5ef531ac3f007c09206c4a9db32ca9 (patch) | |
tree | 45db33608d033749b71cd5e6862c31face26e88a /src/data/Tweet.java | |
parent | a4db85de038f3d07bd379ddaf37bc7815c37b28b (diff) | |
download | Datafiller-bb7e2b32ef5ef531ac3f007c09206c4a9db32ca9.tar.gz |
Centralize Gson creation and registration
Diffstat (limited to 'src/data/Tweet.java')
-rw-r--r-- | src/data/Tweet.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/data/Tweet.java b/src/data/Tweet.java index 3caae6a..04b5f2c 100644 --- a/src/data/Tweet.java +++ b/src/data/Tweet.java @@ -1,7 +1,5 @@ package data; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; /** * Represents the tweet object as returned by the twitter API. @@ -32,8 +30,8 @@ public class Tweet { @Override public String toString() { - Gson gson = new GsonBuilder().setPrettyPrinting().create(); - return gson.toJson(this); + return TwitterJsonDeserializer.getGsonBuilder() + .setPrettyPrinting().create().toJson(this); } public static class Place { |