toJson method

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

Serializes this as a JSON object.

Implementation

@override
Map<String, Object?> toJson() => {
      'exception': switch (exception) {
        final AWSSerializable serializable => serializable.toJson(),
        _ => exception.toString(),
      },
      'stackTrace': stackTrace?.toString(),
    };