toJson method
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;
}