toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() {
  var favourited = this.favourited;
  var lastmodified = this.lastmodified;
  var lastcontributed = this.lastcontributed;
  var viewed = this.viewed;
  var scheduled = this.scheduled;
  var expandable = this.expandable;

  final json = <String, Object?>{};
  if (favourited != null) {
    json[r'favourited'] = favourited.toJson();
  }
  if (lastmodified != null) {
    json[r'lastmodified'] = lastmodified.toJson();
  }
  if (lastcontributed != null) {
    json[r'lastcontributed'] = lastcontributed.toJson();
  }
  if (viewed != null) {
    json[r'viewed'] = viewed.toJson();
  }
  if (scheduled != null) {
    json[r'scheduled'] = scheduled;
  }
  if (expandable != null) {
    json[r'_expandable'] = expandable.toJson();
  }
  return json;
}