@@ -0,0 +1,1249 @@
+package com.cloudycrew.cloudycar.utils;%0A%0Aimport com.cloudycrew.cloudycar.models.requests.AcceptedRequest;%0Aimport com.cloudycrew.cloudycar.models.requests.CompletedRequest;%0Aimport com.cloudycrew.cloudycar.models.requests.ConfirmedRequest;%0Aimport com.cloudycrew.cloudycar.models.requests.PendingRequest;%0Aimport com.cloudycrew.cloudycar.models.requests.Request;%0Aimport com.google.gson.Gson;%0Aimport com.google.gson.GsonBuilder;%0Aimport com.google.gson.JsonDeserializer;%0A%0A/**%0A * Created by George on 2016-10-25.%0A */%0A%0Apublic class RequestUtils %7B%0A    private static JsonDeserializer%3CRequest%3E getRequestDeserializer() %7B%0A        return new SubclassDeserializer.Builder%3CRequest%3E()%0A                .setTypeFieldName(%22requestType%22)%0A                .registerRequestType(PendingRequest.TYPE_NAME, PendingRequest.class)%0A                .registerRequestType(AcceptedRequest.TYPE_NAME, AcceptedRequest.class)%0A                .registerRequestType(ConfirmedRequest.TYPE_NAME, ConfirmedRequest.class)%0A                .registerRequestType(CompletedRequest.TYPE_NAME, CompletedRequest.class)%0A                .build();%0A    %7D%0A%0A    public static Gson getGson() %7B%0A        return new GsonBuilder().registerTypeAdapter(Request.class, getRequestDeserializer()).create();%0A    %7D%0A%7D%0A

Add request utils for getting a gson instance that can handle deserializing requests