toJson method
Implementation
Map<String, dynamic> toJson() {
return <String, dynamic>{
'id': id,
'date': date?.toIso8601String(),
'date_gmt': dateGmt?.toIso8601String(),
'guid': guid?.toJson(),
'password': password,
'modified': modified?.toIso8601String(),
'modified_gmt': modifiedGmt?.toIso8601String(),
'slug': slug,
'status': status.name,
'type': type,
'link': link,
'title': title?.toJson(),
'content': content?.toJson(),
'excerpt': excerpt?.toJson(),
'author': author,
'featured_media': featuredMedia,
'comment_status': commentStatus.name,
'ping_status': pingStatus.name,
'sticky': sticky,
'template': template,
'featured_image_url': featuredImageUrl,
'author_meta': authorMeta?.toJson(),
'format': format.name,
'meta': meta,
'categories': categories,
'tags': tags,
'_links': links?.toJson(),
};
}