@@ -0,0 +1,1788 @@
+package cmput301w15t07.TravelTracker.model;%0A%0Aimport java.lang.reflect.Type;%0Aimport java.util.UUID;%0A%0Aimport android.util.Log;%0A%0Aimport com.google.gson.JsonDeserializationContext;%0Aimport com.google.gson.JsonDeserializer;%0Aimport com.google.gson.JsonElement;%0Aimport com.google.gson.JsonParseException;%0Aimport com.google.gson.JsonPrimitive;%0Aimport com.google.gson.JsonSerializationContext;%0Aimport com.google.gson.JsonSerializer;%0A%0Apublic class TagAdapter implements JsonDeserializer%3CTag%3E, JsonSerializer%3CTag%3E %7B%0A    private static String separator = String.valueOf((char) 0xe2ac9b); // Theoretically a lack box%0A%0A    @Override%0A    public JsonElement serialize(Tag tag, Type type,%0A            JsonSerializationContext context) %7B%0A        %0A        String serialized = %22%22;%0A        %0A        serialized += tag.getUUID().toString() + separator;%0A        serialized += tag.getUser().toString() + separator;%0A        serialized += tag.getTitle();%0A        %0A        return new JsonPrimitive(serialized);%0A    %7D%0A%0A    @Override%0A    public Tag deserialize(JsonElement json, Type type,%0A            JsonDeserializationContext context) throws JsonParseException %7B%0A        String serialized = json.getAsString();%0A        Log.d(%22GsonIOManager%22, serialized);%0A        %0A        String%5B%5D strings = serialized.split(separator);%0A        for (int i = 0; i %3C strings.length; i++)%0A            Log.d(%22GsonIOManager%22, strings%5Bi%5D);%0A        %0A        if (strings.length != 3) %7B%0A            throw new RuntimeException(%22Can't deserialize Tag with fields != 3.%22);%0A        %7D%0A        %0A        UUID docID = UUID.fromString(strings%5B0%5D);%0A        UUID userID = UUID.fromString(strings%5B1%5D);%0A        String title = strings%5B2%5D;%0A        %0A        Tag tag = new Tag(docID, userID);%0A        tag.setTitle(title);%0A        %0A        return tag;%0A    %7D%0A%0A%7D

Tag adapter for GSON.