toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data["business_status"] = this.businessStatus;
  data["formatted_address"] = this.formattedAddress;
  if (this.geometry != null) data["geometry"] = this.geometry?.toJson();
  data["icon"] = this.icon;
  data["icon_background_color"] = this.iconBackgroundColor;
  data["icon_mask_base_uri"] = this.iconMaskBaseUri;
  data["name"] = this.name;
  if (this.openingHours != null) data["opening_hours"] = this.openingHours?.toJson();
  if (this.photos != null) data["photos"] = this.photos?.map((e) => e.toJson()).toList();
  data["place_id"] = this.placeId;
  if (this.plusCode != null) data["plus_code"] = this.plusCode?.toJson();
  data["price_level"] = this.priceLevel;
  data["rating"] = this.rating;
  data["reference"] = this.reference;
  if (this.types != null) data["types"] = this.types;
  data["user_ratings_total"] = this.userRatingsTotal;
  return data;
}