RegeocodeAddress.fromJson constructor

RegeocodeAddress.fromJson(
  1. Map<String, dynamic> json
)

Implementation

RegeocodeAddress.fromJson(Map<String, dynamic> json) {
  adCode = json['adCode'];
  if (json['aois'] != null) {
    aois = [];
    json['aois'].forEach((v) {
      aois?.add(Aoi.fromJson(v));
    });
  }
  building = json['building'];
  if (json['businessAreas'] != null) {
    businessAreas = [];
    json['businessAreas'].forEach((v) {
      businessAreas?.add(BusinessAreas.fromJson(v));
    });
  }
  city = json['city'];
  cityCode = json['cityCode'];
  country = json['country'];
  if (json['crossroads'] != null) {
    crossroads = [];
    json['crossroads'].forEach((v) {
      crossroads?.add(Crossroad.fromJson(v));
    });
  }
  district = json['district'];
  formatAddress = json['formatAddress'];
  neighborhood = json['neighborhood'];
  if (json['pois'] != null) {
    pois = [];
    json['pois'].forEach((v) {
      pois?.add(PoiItem.fromJson(v));
    });
  }
  province = json['province'];
  if (json['roads'] != null) {
    roads = [];
    json['roads'].forEach((v) {
      roads?.add(Road.fromJson(v));
    });
  }
  streetNumber = json['streetNumber'] != null ? StreetNumber.fromJson(json['streetNumber']) : null;
  towncode = json['towncode'];
  township = json['township'];
}