Package com.mailersend.sdk.util
Class JsonSerializationDeserializationStrategy
- java.lang.Object
-
- com.mailersend.sdk.util.JsonSerializationDeserializationStrategy
-
- All Implemented Interfaces:
com.google.gson.ExclusionStrategy
public class JsonSerializationDeserializationStrategy extends Object implements com.google.gson.ExclusionStrategy
Handles the serialization and deserialization strategy for all API objects (Email, Activity, etc.). If a field does not have the @Expose annotiation, it gets de/serialized normally. If it has the @Expose annotation, the annotation's parameters determine the behaviour- Version:
- $Id: $Id
- Author:
- mailersend
-
-
Constructor Summary
Constructors Constructor Description JsonSerializationDeserializationStrategy(boolean isDeserialize)Constructor for JsonSerializationDeserializationStrategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanshouldSkipClass(Class<?> sClass)Just keeping it here because it is required by the ExclusionStrategy interface Always returns falsebooleanshouldSkipField(com.google.gson.FieldAttributes field)Implements the field exclusion strategy If a field does not have the @Expose annotiation, it gets de/serialized normally.
-
-
-
Method Detail
-
shouldSkipClass
public boolean shouldSkipClass(Class<?> sClass)
Just keeping it here because it is required by the ExclusionStrategy interface Always returns false- Specified by:
shouldSkipClassin interfacecom.google.gson.ExclusionStrategy
-
shouldSkipField
public boolean shouldSkipField(com.google.gson.FieldAttributes field)
Implements the field exclusion strategy If a field does not have the @Expose annotiation, it gets de/serialized normally. If it has the @Expose annotation, the annotation's parameters determine the behaviour- Specified by:
shouldSkipFieldin interfacecom.google.gson.ExclusionStrategy
-
-