toJson method
Converts the current instance of the ResponseModel class into a JSON map.
The result property maps to the 'result' key and the reason property maps to the 'reason' key in the map.
Implementation
Map<String, dynamic> toJson() {
return {
'result': result,
'reason': reason,
};
}