toJson method

  1. @override
Map<String, Object> toJson()

Returns a JSON presentation of the object.

Implementation

@override
Map<String, Object> toJson() {
  var result = <String, Object>{};
  result['code'] = code.toJson();
  result['message'] = message;
  var stackTrace = this.stackTrace;
  if (stackTrace != null) {
    result['stackTrace'] = stackTrace;
  }
  return result;
}