fromJson static method

SearchPerson? fromJson(
  1. dynamic jsonObject
)

Implementation

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

  result.detection = SearchPersonDetection.fromJson(jsonObject["detection"]);
  if (jsonObject["images"] != null)
    for (var item in jsonObject["images"])
      result.images.add(SearchPersonImage.fromJson(item));
  result.name = jsonObject["name"];
  if (jsonObject["groups"] != null)
    for (var item in jsonObject["groups"])
      result.groups.add(item);
  result.updatedAt = jsonObject["updatedAt"];
  result.id = jsonObject["id"];
  result.metadata = jsonObject["metadata"];
  result.createdAt = jsonObject["createdAt"];

  return result;
}