toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'location'] = this.location;
  json[r'validFrom'] = this.validFrom;
  json[r'validTo'] = this.validTo;
  if (this.airTemperature != null) {
    json[r'airTemperature'] = this.airTemperature;
  } else {
    json[r'airTemperature'] = null;
  }
  if (this.dewPoint != null) {
    json[r'dewPoint'] = this.dewPoint;
  } else {
    json[r'dewPoint'] = null;
  }
  if (this.pressure != null) {
    json[r'pressure'] = this.pressure;
  } else {
    json[r'pressure'] = null;
  }
  if (this.wind != null) {
    json[r'wind'] = this.wind;
  } else {
    json[r'wind'] = null;
  }
  if (this.visibility != null) {
    json[r'visibility'] = this.visibility;
  } else {
    json[r'visibility'] = null;
  }
  if (this.report != null) {
    json[r'report'] = this.report;
  } else {
    json[r'report'] = null;
  }
  if (this.cloudBase != null) {
    json[r'cloudBase'] = this.cloudBase;
  } else {
    json[r'cloudBase'] = null;
  }
  if (this.cloudCover != null) {
    json[r'cloudCover'] = this.cloudCover;
  } else {
    json[r'cloudCover'] = null;
  }
  if (this.phenomenaGroups != null) {
    json[r'phenomenaGroups'] = this.phenomenaGroups;
  } else {
    json[r'phenomenaGroups'] = null;
  }
  return json;
}