toJson method
Implementation
Map toJson() {
Map _result = {};
if (image != null) _result.addAll({"image": image!.toJson()});
if (imageIndex != null) _result.addAll({"imageIndex": imageIndex});
if (!faces.isEmpty) {
var list = [];
for (var item in faces) list.add(item!.toJson());
_result.addAll({"faces": list});
}
if (exception != null) _result.addAll({"exception": exception!.toJson()});
return _result;
}