toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final Map<String, dynamic> data = new Map<String, dynamic>();
  if (this.post != null) {
    data['post'] = this.post.toJson();
  }
  if (this.page != null) {
    data['page'] = this.page.toJson();
  }
  if (this.attachment != null) {
    data['attachment'] = this.attachment.toJson();
  }
  if (this.wpBlock != null) {
    data['wp_block'] = this.wpBlock.toJson();
  }
  return data;
}