public class JobExecutionPlanListDeserializer extends Object implements com.google.gson.JsonDeserializer<List<JobExecutionPlan>>
| Constructor and Description |
|---|
JobExecutionPlanListDeserializer(Map<URI,TopologySpec> topologySpecMap) |
| Modifier and Type | Method and Description |
|---|---|
List<JobExecutionPlan> |
deserialize(com.google.gson.JsonElement json,
Type typeOfT,
com.google.gson.JsonDeserializationContext context)
Gson invokes this call-back method during deserialization when it encounters a field of the
specified type.
|
public JobExecutionPlanListDeserializer(Map<URI,TopologySpec> topologySpecMap)
public List<JobExecutionPlan> deserialize(com.google.gson.JsonElement json, Type typeOfT, com.google.gson.JsonDeserializationContext context) throws com.google.gson.JsonParseException
In the implementation of this call-back method, you should consider invoking
JsonDeserializationContext.deserialize(JsonElement, Type) method to create objects
for any non-trivial field of the returned object. However, you should never invoke it on the
the same type passing json since that will cause an infinite loop (Gson will call your
call-back method again).
deserialize in interface com.google.gson.JsonDeserializer<List<JobExecutionPlan>>json - The Json data being deserializedtypeOfT - The type of the Object to deserialize tocontext - Tcom.google.gson.JsonParseException - if json is not in the expected format of typeofT