toJson method

Map<String, dynamic> toJson()

Converts an ISO4217Currency instance to a JSON object.

The returned map will contain the same fields as the constructor:

  • code (String)
  • numCode (int)
  • digits (int)
  • currencyName (String)
  • locations List String

Implementation

Map<String, dynamic> toJson() {
  return {
    'code': code,
    'num_code': numCode,
    'digits': digits,
    'currency_name': currencyName,
    'locations': locations,
  };
}