From bb7e2b32ef5ef531ac3f007c09206c4a9db32ca9 Mon Sep 17 00:00:00 2001 From: Peter Wu Date: Sat, 10 May 2014 17:30:49 +0200 Subject: Centralize Gson creation and registration --- src/data/Tweet.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/data/Tweet.java') 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 { -- cgit v1.2.1