toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'_id'] = this.id;
  if (this.userId != null) {
    json[r'userId'] = this.userId;
  } else {
    json[r'userId'] = null;
  }
    json[r'commenterName'] = this.commenterName;
  if (this.commenterLink != null) {
    json[r'commenterLink'] = this.commenterLink;
  } else {
    json[r'commenterLink'] = null;
  }
    json[r'commentHTML'] = this.commentHTML;
  if (this.parentId != null) {
    json[r'parentId'] = this.parentId;
  } else {
    json[r'parentId'] = null;
  }
  if (this.date != null) {
    json[r'date'] = this.date!.toUtc().toIso8601String();
  } else {
    json[r'date'] = null;
  }
  if (this.votes != null) {
    json[r'votes'] = this.votes;
  } else {
    json[r'votes'] = null;
  }
  if (this.votesUp != null) {
    json[r'votesUp'] = this.votesUp;
  } else {
    json[r'votesUp'] = null;
  }
  if (this.votesDown != null) {
    json[r'votesDown'] = this.votesDown;
  } else {
    json[r'votesDown'] = null;
  }
    json[r'verified'] = this.verified;
  if (this.avatarSrc != null) {
    json[r'avatarSrc'] = this.avatarSrc;
  } else {
    json[r'avatarSrc'] = null;
  }
  if (this.hasImages != null) {
    json[r'hasImages'] = this.hasImages;
  } else {
    json[r'hasImages'] = null;
  }
  if (this.isByAdmin != null) {
    json[r'isByAdmin'] = this.isByAdmin;
  } else {
    json[r'isByAdmin'] = null;
  }
  if (this.isByModerator != null) {
    json[r'isByModerator'] = this.isByModerator;
  } else {
    json[r'isByModerator'] = null;
  }
  if (this.isPinned != null) {
    json[r'isPinned'] = this.isPinned;
  } else {
    json[r'isPinned'] = null;
  }
  if (this.isLocked != null) {
    json[r'isLocked'] = this.isLocked;
  } else {
    json[r'isLocked'] = null;
  }
  if (this.displayLabel != null) {
    json[r'displayLabel'] = this.displayLabel;
  } else {
    json[r'displayLabel'] = null;
  }
  if (this.rating != null) {
    json[r'rating'] = this.rating;
  } else {
    json[r'rating'] = null;
  }
  if (this.badges != null) {
    json[r'badges'] = this.badges;
  } else {
    json[r'badges'] = null;
  }
  if (this.viewCount != null) {
    json[r'viewCount'] = this.viewCount;
  } else {
    json[r'viewCount'] = null;
  }
  if (this.isDeleted != null) {
    json[r'isDeleted'] = this.isDeleted;
  } else {
    json[r'isDeleted'] = null;
  }
  if (this.isDeletedUser != null) {
    json[r'isDeletedUser'] = this.isDeletedUser;
  } else {
    json[r'isDeletedUser'] = null;
  }
  if (this.isSpam != null) {
    json[r'isSpam'] = this.isSpam;
  } else {
    json[r'isSpam'] = null;
  }
  if (this.anonUserId != null) {
    json[r'anonUserId'] = this.anonUserId;
  } else {
    json[r'anonUserId'] = null;
  }
    json[r'feedbackIds'] = this.feedbackIds;
  if (this.requiresVerification != null) {
    json[r'requiresVerification'] = this.requiresVerification;
  } else {
    json[r'requiresVerification'] = null;
  }
  if (this.editKey != null) {
    json[r'editKey'] = this.editKey;
  } else {
    json[r'editKey'] = null;
  }
  if (this.approved != null) {
    json[r'approved'] = this.approved;
  } else {
    json[r'approved'] = null;
  }
  if (this.isUnread != null) {
    json[r'isUnread'] = this.isUnread;
  } else {
    json[r'isUnread'] = null;
  }
  if (this.myVoteId != null) {
    json[r'myVoteId'] = this.myVoteId;
  } else {
    json[r'myVoteId'] = null;
  }
  if (this.isVotedDown != null) {
    json[r'isVotedDown'] = this.isVotedDown;
  } else {
    json[r'isVotedDown'] = null;
  }
  if (this.isVotedUp != null) {
    json[r'isVotedUp'] = this.isVotedUp;
  } else {
    json[r'isVotedUp'] = null;
  }
  if (this.hasChildren != null) {
    json[r'hasChildren'] = this.hasChildren;
  } else {
    json[r'hasChildren'] = null;
  }
  if (this.nestedChildrenCount != null) {
    json[r'nestedChildrenCount'] = this.nestedChildrenCount;
  } else {
    json[r'nestedChildrenCount'] = null;
  }
  if (this.childCount != null) {
    json[r'childCount'] = this.childCount;
  } else {
    json[r'childCount'] = null;
  }
    json[r'children'] = this.children;
  if (this.isFlagged != null) {
    json[r'isFlagged'] = this.isFlagged;
  } else {
    json[r'isFlagged'] = null;
  }
  if (this.isBlocked != null) {
    json[r'isBlocked'] = this.isBlocked;
  } else {
    json[r'isBlocked'] = null;
  }
  return json;
}