toJson method

Map<String, dynamic> toJson()

Produces a Map that can be serialized to JSON.

Implementation

Map<String, dynamic> toJson() {
  return <String, dynamic>{
    if (type != null) 'type': type,
    if (value != null) 'value': value,
    if (module != null) 'module': module,
    if (stackTrace != null) 'stacktrace': stackTrace!.toJson(),
    if (mechanism != null) 'mechanism': mechanism!.toJson(),
    if (threadId != null) 'thread_id': threadId,
  };
}