toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'_id'] = this.id;
json[r'tenantId'] = this.tenantId;
if (this.userId != null) {
json[r'userId'] = this.userId;
} else {
json[r'userId'] = null;
}
json[r'urlId'] = this.urlId;
json[r'commenterName'] = this.commenterName;
if (this.commenterLink != null) {
json[r'commenterLink'] = this.commenterLink;
} else {
json[r'commenterLink'] = null;
}
json[r'commentHTML'] = this.commentHTML;
json[r'comment'] = this.comment;
if (this.parentId != null) {
json[r'parentId'] = this.parentId;
} else {
json[r'parentId'] = 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.hasLinks != null) {
json[r'hasLinks'] = this.hasLinks;
} else {
json[r'hasLinks'] = 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.flagCount != null) {
json[r'flagCount'] = this.flagCount;
} else {
json[r'flagCount'] = null;
}
if (this.domain != null) {
json[r'domain'] = this.domain;
} else {
json[r'domain'] = null;
}
json[r'url'] = this.url;
if (this.pageTitle != null) {
json[r'pageTitle'] = this.pageTitle;
} else {
json[r'pageTitle'] = null;
}
if (this.expireAt != null) {
json[r'expireAt'] = this.expireAt!.toUtc().toIso8601String();
} else {
json[r'expireAt'] = null;
}
if (this.reviewed != null) {
json[r'reviewed'] = this.reviewed;
} else {
json[r'reviewed'] = null;
}
if (this.hasCode != null) {
json[r'hasCode'] = this.hasCode;
} else {
json[r'hasCode'] = null;
}
json[r'approved'] = this.approved;
if (this.locale != null) {
json[r'locale'] = this.locale;
} else {
json[r'locale'] = null;
}
if (this.isBannedUser != null) {
json[r'isBannedUser'] = this.isBannedUser;
} else {
json[r'isBannedUser'] = null;
}
if (this.groupIds != null) {
json[r'groupIds'] = this.groupIds;
} else {
json[r'groupIds'] = null;
}
return json;
}