fromJson static method

ClassificationNode fromJson(
  1. dynamic value
)

Returns a new ClassificationNode instance and imports its values from value if it's a Map, null otherwise.

Implementation

// ignore: prefer_constructors_over_static_methods
static ClassificationNode fromJson(dynamic value) {
  if (value is Map) {
    final json = value.cast<String, dynamic>();
    return ClassificationNode(
      classificationId: mapValueOfType<int>(json, r'ClassificationId'),
      taxonomy: mapValueOfType<String>(json, r'Taxonomy'),
      name: mapValueOfType<String>(json, r'Name'),
      parentId: mapValueOfType<int>(json, r'ParentId'),
      parent: ClassificationNode.fromJson(json[r'Parent']),
    );
  }
  return null;
}