Package com.smartcar.sdk.data
Class BatchDeserializer
- java.lang.Object
-
- com.smartcar.sdk.data.BatchDeserializer
-
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<BatchResponse>
public class BatchDeserializer extends java.lang.Object implements com.google.gson.JsonDeserializer<BatchResponse>
BatchDeserializerThis is a customer deserialization method to be used by the GSON object. By default, if you pass a JSON object to GSON and tell it to turn that object into a class, it looks at the instance variables on that class, and it attempts to assign vars from the JSON to this class.
But for the BatchResponse class, we need to process that JSON response from /batch. This method allows us to send the JSON data through the BatchResponse constructor.
-
-
Constructor Summary
Constructors Constructor Description BatchDeserializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchResponse
deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
-
-
-
Method Detail
-
deserialize
public BatchResponse deserialize(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
- Specified by:
deserialize
in interfacecom.google.gson.JsonDeserializer<BatchResponse>
-
-