toJson method

Map<String, dynamic> toJson()

Converts this EmailAddress object to a JSON object.

Each parameter of EmailAddress corresponds to a key in the resulting JSON object.

Implementation

Map<String, dynamic> toJson() {
  return {
    'name': name,
    'address': address,
  };
}