String className = jsonObj.get("className").getAsString();
String name = jsonObj.get("name").getAsString();
String description = jsonObj.get("description").getAsString();
Set<String> dataSets = deserializeSet(jsonObj.get("datasets"), context, String.class);
Map<String, String> properties = deserializeMap(jsonObj.get("properties"), context, String.class);
ResourceSpecification resourceSpec = context.deserialize(jsonObj.get("resources"),
new TypeToken<ResourceSpecification>() { }.getType());
JsonElement instanceElem = jsonObj.get("instances");
int instances = (instanceElem == null || instanceElem.isJsonNull()) ? 1 : jsonObj.get("instances").getAsInt();
return new DefaultProcedureSpecification(className, name, description, dataSets,