Package com.contentful.java.cma.gson
Class SnapshotDeserializer
- java.lang.Object
-
- com.contentful.java.cma.gson.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.
-
-
Constructor Summary
Constructors Constructor Description SnapshotDeserializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CMASnapshotdeserialize(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.
-
-
-
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:
deserializein interfacecom.google.gson.JsonDeserializer<CMASnapshot>- Parameters:
json- the json blob to be convertedtypeOfT- the type to be convertedcontext- 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.
-
-