AXValue.fromJson constructor

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

Implementation

factory AXValue.fromJson(Map<String, dynamic> json) {
  return AXValue(
    type: AXValueType.fromJson(json['type'] as String),
    value: json.containsKey('value') ? json['value'] as dynamic : null,
    relatedNodes: json.containsKey('relatedNodes')
        ? (json['relatedNodes'] as List)
            .map((e) => AXRelatedNode.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
    sources: json.containsKey('sources')
        ? (json['sources'] as List)
            .map((e) => AXValueSource.fromJson(e as Map<String, dynamic>))
            .toList()
        : null,
  );
}