toJson method

Map<String, dynamic> toJson()

Converts the ServerErrorResponse instance into a JSON map.

Useful for serializing the object back to JSON format.

Implementation

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