fromJson static method
Implementation
@visibleForTesting
static DetectFacesConfig? fromJson(jsonObject) {
if (jsonObject == null) return null;
var result = DetectFacesConfig();
if (jsonObject["attributes"] != null) {
result.attributes = [];
for (var item in jsonObject["attributes"]) {
result.attributes!.add(DetectFacesAttribute.getByValue(item)!);
}
}
if (jsonObject["customQuality"] != null) {
result.customQuality = [];
for (var item in jsonObject["customQuality"]) {
result.customQuality!.add(ImageQualityCharacteristic.fromJson(item)!);
}
}
result.outputImageParams =
OutputImageParams.fromJson(jsonObject["outputImageParams"]);
result.onlyCentralFace = jsonObject["onlyCentralFace"];
return result;
}