PostTypePost.fromJson constructor

PostTypePost.fromJson(
  1. Map<String, dynamic> json
)

Implementation

PostTypePost.fromJson(Map<String, dynamic> json) {
  capabilities = json['capabilities'] != null
      ? new Capabilities.fromJson(json['capabilities'])
      : null;
  description = json['description'];
  hierarchical = json['hierarchical'];
  viewable = json['viewable'];
  labels =
      json['labels'] != null ? new Labels.fromJson(json['labels']) : null;
  name = json['name'];
  slug = json['slug'];
  supports = json['supports'] != null
      ? new Supports.fromJson(json['supports'])
      : null;
  taxonomies = json['taxonomies'].cast<String>();
  restBase = json['rest_base'];
  lLinks = json['_links'] != null ? new Links.fromJson(json['_links']) : null;
}