use of com.continuuity.weave.internal.DefaultResourceReport in project weave by continuuity.
the class ResourceReportCodec method deserialize.
@Override
public ResourceReport deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context) throws JsonParseException {
JsonObject jsonObj = json.getAsJsonObject();
String appMasterId = jsonObj.get("appMasterId").getAsString();
WeaveRunResources masterResources = context.deserialize(jsonObj.get("appMasterResources"), WeaveRunResources.class);
Map<String, Collection<WeaveRunResources>> resources = context.deserialize(jsonObj.get("runnableResources"), new TypeToken<Map<String, Collection<WeaveRunResources>>>() {
}.getType());
return new DefaultResourceReport(appMasterId, masterResources, resources);
}
Aggregations