Class CollectionPageSerializer

java.lang.Object
com.microsoft.graph.serializer.CollectionPageSerializer

public class CollectionPageSerializer extends Object
Specialized serializer to handle collection pages
  • Method Details

    • serialize

      @Nullable public static <T1,​ T2 extends BaseRequestBuilder<T1>> com.google.gson.JsonElement serialize(@Nonnull BaseCollectionPage<T1,​T2> src, @Nonnull ILogger logger)
      Serializes an CollectionPage
      Type Parameters:
      T1 - the entity type for the collection
      T2 - the collection request builder interface type
      Parameters:
      src - the CollectionPage variable for serialization
      logger - the logger
      Returns:
      JsonElement of CollectionPage
    • deserialize

      @Nullable public static <T1,​ T2 extends BaseRequestBuilder<T1>> BaseCollectionPage<T1,​T2> deserialize(@Nonnull com.google.gson.JsonElement json, @Nonnull Type typeOfT, @Nonnull ILogger logger) throws com.google.gson.JsonParseException
      Deserializes the JsonElement
      Type Parameters:
      T1 - the entity type for the collection
      T2 - the collection request builder interface type
      Parameters:
      json - the source CollectionPage's Json
      typeOfT - The type of the CollectionPage to deserialize to
      logger - the logger
      Returns:
      the deserialized CollectionPage
      Throws:
      com.google.gson.JsonParseException - the parse exception