toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.self != null) {
    data['self'] = this.self.map((v) => v.toJson()).toList();
  }
  if (this.collection != null) {
    data['collection'] = this.collection.map((v) => v.toJson()).toList();
  }
  if (this.about != null) {
    data['about'] = this.about.map((v) => v.toJson()).toList();
  }
  if (this.author != null) {
    data['author'] = this.author.map((v) => v.toJson()).toList();
  }
  if (this.replies != null) {
    data['replies'] = this.replies.map((v) => v.toJson()).toList();
  }
  if (this.archives != null) {
    data['archives'] = this.archives.map((v) => v.toJson()).toList();
  }
  if (this.versionHistory != null) {
    data['version-history'] =
        this.versionHistory.map((v) => v.toJson()).toList();
  }
  if (this.wpPostType != null) {
    data['wp:post_type'] = this.wpPostType.map((v) => v.toJson()).toList();
  }
  if (this.predecessorVersion != null) {
    data['predecessor-version'] =
        this.predecessorVersion.map((v) => v.toJson()).toList();
  }
  if (this.wpFeaturedmedia != null) {
    data['wp:featuredmedia'] =
        this.wpFeaturedmedia.map((v) => v.toJson()).toList();
  }
  if (this.wpAttachment != null) {
    data['wp:attachment'] = this.wpAttachment.map((v) => v.toJson()).toList();
  }
  if (this.wpTerm != null) {
    data['wp:term'] = this.wpTerm.map((v) => v.toJson()).toList();
  }
  if (this.wpActionPublish != null) {
    data['wp:action-publish'] =
        this.wpActionPublish.map((v) => v.toJson()).toList();
  }
  if (this.wpActionUnfilteredHtml != null) {
    data['wp:action-unfiltered-html'] =
        this.wpActionUnfilteredHtml.map((v) => v.toJson()).toList();
  }
  if (this.wpActionSticky != null) {
    data['wp:action-sticky'] =
        this.wpActionSticky.map((v) => v.toJson()).toList();
  }
  if (this.wpActionAssignAuthor != null) {
    data['wp:action-assign-author'] =
        this.wpActionAssignAuthor.map((v) => v.toJson()).toList();
  }
  if (this.wpActionCreateCategories != null) {
    data['wp:action-create-categories'] =
        this.wpActionCreateCategories.map((v) => v.toJson()).toList();
  }
  if (this.wpActionAssignCategories != null) {
    data['wp:action-assign-categories'] =
        this.wpActionAssignCategories.map((v) => v.toJson()).toList();
  }
  if (this.wpActionCreateTags != null) {
    data['wp:action-create-tags'] =
        this.wpActionCreateTags.map((v) => v.toJson()).toList();
  }
  if (this.wpActionAssignTags != null) {
    data['wp:action-assign-tags'] =
        this.wpActionAssignTags.map((v) => v.toJson()).toList();
  }
  if (this.wpItems != null) {
    data['wp:items'] = this.wpItems.map((v) => v.toJson()).toList();
  }
  if (this.up != null) {
    data['up'] = this.up.map((v) => v.toJson()).toList();
  }
  if (this.inReplyTo != null) {
    data['in-reply-to'] = this.inReplyTo.map((v) => v.toJson()).toList();
  }
  if (this.children != null) {
    data['children'] = this.children.map((v) => v.toJson()).toList();
  }
  if (this.curies != null) {
    data['curies'] = this.curies.map((v) => v.toJson()).toList();
  }
  return data;
}