toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'id'] = this.id;
    json[r'category'] = this.category;
  if (this.title != null) {
    json[r'title'] = this.title;
  } else {
    json[r'title'] = null;
  }
  if (this.snippet != null) {
    json[r'snippet'] = this.snippet;
  } else {
    json[r'snippet'] = null;
  }
  if (this.source_ != null) {
    json[r'source'] = this.source_;
  } else {
    json[r'source'] = null;
  }
  if (this.sourceId != null) {
    json[r'sourceId'] = this.sourceId;
  } else {
    json[r'sourceId'] = null;
  }
  if (this.accountId != null) {
    json[r'accountId'] = this.accountId;
  } else {
    json[r'accountId'] = null;
  }
  if (this.isRead != null) {
    json[r'isRead'] = this.isRead;
  } else {
    json[r'isRead'] = null;
  }
  if (this.isMention != null) {
    json[r'isMention'] = this.isMention;
  } else {
    json[r'isMention'] = null;
  }
  if (this.timestamp != null) {
    json[r'timestamp'] = this.timestamp!.toUtc().toIso8601String();
  } else {
    json[r'timestamp'] = null;
  }
    json[r'metadata'] = this.metadata;
  return json;
}