Class 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 Detail

      • JsonSerializationDeserializationStrategy

        public JsonSerializationDeserializationStrategy​(boolean isDeserialize)

        Constructor for JsonSerializationDeserializationStrategy.

        Parameters:
        isDeserialize - a boolean.
    • 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:
        shouldSkipClass in interface com.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:
        shouldSkipField in interface com.google.gson.ExclusionStrategy