toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final data = <String, dynamic>{};
  data['adCode'] = this.adCode;
  if (this.aois != null) {
    data['aois'] = this.aois?.map((v) => v.toJson()).toList();
  }
  data['building'] = this.building;
  if (this.businessAreas != null) {
    data['businessAreas'] = this.businessAreas?.map((v) => v.toJson()).toList();
  }
  data['city'] = this.city;
  data['cityCode'] = this.cityCode;
  data['country'] = this.country;
  if (this.crossroads != null) {
    data['crossroads'] = this.crossroads?.map((v) => v.toJson()).toList();
  }
  data['district'] = this.district;
  data['formatAddress'] = this.formatAddress;
  data['neighborhood'] = this.neighborhood;
  if (this.pois != null) {
    data['pois'] = this.pois?.map((v) => v.toJson()).toList();
  }
  data['province'] = this.province;
  if (this.roads != null) {
    data['roads'] = this.roads?.map((v) => v.toJson()).toList();
  }
  if (this.streetNumber != null) {
    data['streetNumber'] = this.streetNumber?.toJson();
  }
  data['towncode'] = this.towncode;
  data['township'] = this.township;
  return data;
}