toJson method

Map<String, dynamic> toJson()

Converts this instance into a JSON-compatible map.

Useful for serializing the object for logging, debugging, or API response transformation.

Implementation

Map<String, dynamic> toJson() => {
      'timestamp': timestamp,
      'status': statusCode,
      'error': error,
      'message': message,
    };