Class SnapshotDeserializer

  • All Implemented Interfaces:
    com.google.gson.JsonDeserializer<CMASnapshot>

    public class SnapshotDeserializer
    extends java.lang.Object
    implements com.google.gson.JsonDeserializer<CMASnapshot>
    This class will take a json blob and deserialize a snapshot from it.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CMASnapshot deserialize​(com.google.gson.JsonElement json, java.lang.reflect.Type typeOfT, com.google.gson.JsonDeserializationContext context)
      Inspect json payload and generate either a content type snapshot from it or an entry snap shot.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SnapshotDeserializer

        public SnapshotDeserializer()
    • Method Detail

      • deserialize

        public CMASnapshot deserialize​(com.google.gson.JsonElement json,
                                       java.lang.reflect.Type typeOfT,
                                       com.google.gson.JsonDeserializationContext context)
                                throws com.google.gson.JsonParseException
        Inspect json payload and generate either a content type snapshot from it or an entry snap shot.
        Specified by:
        deserialize in interface com.google.gson.JsonDeserializer<CMASnapshot>
        Parameters:
        json - the json blob to be converted
        typeOfT - the type to be converted
        context - the json context for updating
        Returns:
        a snapshot, parsed from the json
        Throws:
        com.google.gson.JsonParseException - if the json object to be parsed is malformed.