fromJson static method

MatchFacesResponse? fromJson(
  1. dynamic jsonObject
)

Implementation

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

  result.tag = jsonObject["tag"];
  result.exception = MatchFacesException.fromJson(jsonObject["exception"]);
  if (jsonObject["detections"] != null)
    for (var item in jsonObject["detections"])
      result.detections.add(MatchFacesDetection.fromJson(item));
  if (jsonObject["results"] != null)
    for (var item in jsonObject["results"])
      result.results.add(MatchFacesComparedFacesPair.fromJson(item));

  return result;
}