toJson method

Map<String, dynamic> toJson ()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  data['id'] = this.id;
  data['date'] = this.date;
  data['date_gmt'] = this.dateGmt;
  if (this.guid != null) {
    data['guid'] = this.guid.toJson();
  }
  data['modified'] = this.modified;
  data['modified_gmt'] = this.modifiedGmt;
  data['slug'] = this.slug;
  data['status'] = this.status;
  data['type'] = this.type;
  data['link'] = this.link;
  if (this.title != null) {
    data['title'] = this.title.toJson();
  }
  data['author'] = this.author;
  data['comment_status'] = this.commentStatus;
  data['ping_status'] = this.pingStatus;
  data['template'] = this.template;
  /*if (this.meta != null) {
    data['meta'] = this.meta.map((v) => v.toJson()).toList();
  }*/
  data['permalink_template'] = this.permalinkTemplate;
  data['generated_slug'] = this.generatedSlug;
  if (this.description != null) {
    data['description'] = this.description.toJson();
  }
  if (this.caption != null) {
    data['caption'] = this.caption.toJson();
  }
  data['alt_text'] = this.altText;
  data['media_type'] = this.mediaType;
  data['mime_type'] = this.mimeType;
  if (this.mediaDetails != null) {
    data['media_details'] = this.mediaDetails.toJson();
  }
  data['post'] = this.post;
  data['source_url'] = this.sourceUrl;
  if (this.lLinks != null) {
    data['_links'] = this.lLinks.toJson();
  }
  return data;
}