fromJson static method

RecognizeConfig? fromJson(
  1. dynamic jsonObject
)

Implementation

static RecognizeConfig? fromJson(jsonObject) {
  if (jsonObject == null) return null;
  var result = new RecognizeConfig();

  result.scenario = jsonObject["scenario"];
  result.livePortrait = jsonObject["livePortrait"];
  result.extPortrait = jsonObject["extPortrait"];
  result.onlineProcessingConfig = OnlineProcessingConfig.fromJson(jsonObject["onlineProcessingConfig"]);
  result.image = jsonObject["image"];
  result.oneShotIdentification = jsonObject["oneShotIdentification"];
  if (jsonObject["images"] != null)
    for (var item in jsonObject["images"])
      result.images.add(item);
  if (jsonObject["imageInputData"] != null)
    for (var item in jsonObject["imageInputData"])
      result.imageInputData.add(ImageInputData.fromJson(item));

  return result;
}