DocNode.fromJson constructor

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

Implementation

factory DocNode.fromJson(Map<String, dynamic> json) {
  return DocNode(
    kind: json['kind'] as String,
    name: json['name'] as String,
    declarationKind: json['declarationKind'] as String?,
    namespaceDef: json['namespaceDef'] != null
        ? NamespaceDef.fromJson(json['namespaceDef'])
        : null,
    interfaceDef: json['interfaceDef'] != null
        ? InterfaceDef.fromJson(json['interfaceDef'])
        : null,
    classDef:
        json['classDef'] != null ? ClassDef.fromJson(json['classDef']) : null,
    variableDef: json['variableDef'],
    functionDef: json['functionDef'],
    enumDef: json['enumDef'],
    typeAliasDef: json['typeAliasDef'],
    importDef: json['importDef'],
  );
}