toJson method

Map toJson()

Implementation

Map toJson() {
  Map _result = {};

  if (!matchedFaces.isEmpty) {
    var list = [];
    for (var item in matchedFaces) list.add(item!.toJson());
    _result.addAll({"matchedFaces": list});
  }
  if (!unmatchedFaces.isEmpty) {
    var list = [];
    for (var item in unmatchedFaces) list.add(item!.toJson());
    _result.addAll({"unmatchedFaces": list});
  }

  return _result;
}