public ResourceSpecification deserialize(JsonElement json, Type typeOfT,
JsonDeserializationContext context) throws JsonParseException {
JsonObject jsonObj = json.getAsJsonObject();
final List<String> hosts = context.deserialize(jsonObj.getAsJsonArray("hosts"), List.class);
final List<String> racks = context.deserialize(jsonObj.getAsJsonArray("racks"), List.class);
return new DefaultResourceSpecification(jsonObj.get("cores").getAsInt(),
jsonObj.get("memorySize").getAsInt(),
jsonObj.get("instances").getAsInt(),
jsonObj.get("uplink").getAsInt(),
jsonObj.get("downlink").getAsInt(),
hosts,