Package com.easypost.model
Class ErrorDeserializer
java.lang.Object
com.easypost.model.ErrorDeserializer
- All Implemented Interfaces:
com.google.gson.JsonDeserializer<APIException>
public final class ErrorDeserializer
extends Object
implements com.google.gson.JsonDeserializer<APIException>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) Deserialize an APIException from a JSON object.
-
Constructor Details
-
ErrorDeserializer
public ErrorDeserializer()
-
-
Method Details
-
deserialize
public APIException deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException Deserialize an APIException from a JSON object.- Specified by:
deserializein interfacecom.google.gson.JsonDeserializer<APIException>- Parameters:
json- JSON object to deserialize.typeOfT- Type of the object to deserialize.context- Deserialization context.- Returns:
- Deserialized APIException object.
- Throws:
com.google.gson.JsonParseException- if the JSON object is not a valid SmartRateCollection.
-