JsonArray entryJson = element.getAsJsonArray();
if (entryJson.size() != 2) {
throw new JsonParseException("Expect json array of size = 2, got " + entryJson.size());
}
Discoverable key = context.deserialize(entryJson.get(0), Discoverable.class);
PartitionReplica value = context.deserialize(entryJson.get(1), PartitionReplica.class);
assignments.put(key, value);
}
return new ResourceAssignment(name, assignments);