fromJson static method
Implementation
@visibleForTesting
static VerificationConfig? fromJson(jsonObject) {
if (jsonObject == null) return null;
VerificationConfig? result;
if (jsonObject["personId"] != null) result = VerificationConfig.withPersonId(jsonObject["personId"]);
if (jsonObject["externalId"] != null) result = VerificationConfig.withExternalId(jsonObject["externalId"]);
if (result == null) return null;
result.copyright = jsonObject["copyright"];
result.cameraSwitchEnabled = jsonObject["cameraSwitchEnabled"];
result.closeButtonEnabled = jsonObject["closeButtonEnabled"];
result.torchButtonEnabled = jsonObject["torchButtonEnabled"];
result.vibrateOnSteps = jsonObject["vibrateOnSteps"];
result.cameraPositionAndroid = jsonObject["cameraPositionAndroid"];
result.cameraPositionIOS = CameraPosition.getByValue(jsonObject["cameraPositionIOS"])!;
result.screenOrientation = ScreenOrientation.fromIntList(jsonObject["screenOrientation"])!;
result.locationTrackingEnabled = jsonObject["locationTrackingEnabled"];
result.preventScreenRecording = jsonObject["preventScreenRecording"];
result.attemptsCount = jsonObject["attemptsCount"];
result.recordingProcess = RecordingProcess.getByValue(jsonObject["recordingProcess"])!;
result.livenessType = LivenessType.getByValue(jsonObject["livenessType"])!;
result.tag = jsonObject["tag"];
result.skipStep = LivenessSkipStep.fromIntList(jsonObject["screenOrientation"])!;
result.metadata = jsonObject["metadata"];
result.threshold = _toDouble(jsonObject["threshold"]);
return result;
}