fromJson static method

  1. @visibleForTesting
MatchFacesResponse? fromJson(
  1. dynamic jsonObject
)

Implementation

@visibleForTesting
static MatchFacesResponse? fromJson(jsonObject) {
  var result = MatchFacesResponse._privateConstructor();

  for (var item in jsonObject["results"]) {
    result._results.add(ComparedFacesPair.fromJson(item)!);
  }
  for (var item in jsonObject["detections"]) {
    result._detections.add(MatchFacesDetection.fromJson(item)!);
  }
  result._tag = jsonObject["tag"];
  result._error = MatchFacesException.fromJson(jsonObject["error"]);

  return result;
}