toJson method

Map toJson()

Implementation

Map toJson(){
  Map _result = {};

  if (action != null) _result.addAll({"action": action});
  if (results != null) _result.addAll({"results": results});
  if (error != null) _result.addAll({"error": error});

  return _result;
}