CategoryDataModel.fromJson constructor

CategoryDataModel.fromJson(
  1. dynamic json
)

Implementation

CategoryDataModel.fromJson(var json) {
  try {
    if (json.length == 0) return;
    name = json['name'];
    slug = json['slug'];
    term_group = json['term_group'];
    term_taxonomy_id = json['term_taxonomy_id'];
    taxonomy = json['taxonomy'];
    description = json['description'];
    parent = json['parent'];
    count = json['count'];
    filter = json['filter'];
    term_id = json['term_id'];
    cat_ID = json['cat_ID'];
    category_count = json['category_count'];
    category_description = json['category_description'];
    cat_name = json['cat_name'];
    category_nicename = json['category_nicename'];
    category_parent = json['category_parent'];
  } catch (ex) {
    //throw ModelException(ex.message, ex.hashCode);
  }
}