fromJson static method

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

Implementation

@visibleForTesting
static MatchFacesRequest? fromJson(jsonObject) {
  if (jsonObject == null) return null;

  List<MatchFacesImage> images = [];
  for (var item in jsonObject["images"]) {
    images.add(MatchFacesImage.fromJson(item)!);
  }

  return MatchFacesRequest(images,
      outputImageParams:
          OutputImageParams.fromJson(jsonObject["outputImageParams"]),
      tag: jsonObject["tag"],
      metadata: jsonObject["metadata"]);
}