toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};

  if (type != null) {
    json['type'] = type;
  }

  if (value != null) {
    json['value'] = value;
  }

  if (module != null) {
    json['module'] = module;
  }

  if (stackTrace != null) {
    json['stacktrace'] = stackTrace!.toJson();
  }

  if (mechanism != null) {
    json['mechanism'] = mechanism!.toJson();
  }

  if (threadId != null) {
    json['thread_id'] = threadId;
  }

  return json;
}