toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final code = this.code;
  final reason = this.reason;
  return {
    if (code != null) 'Code': code,
    if (reason != null) 'Reason': reason,
  };
}