LineageSubgraph.fromJson constructor
LineageSubgraph.fromJson(
- Object? j
Implementation
factory LineageSubgraph.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return LineageSubgraph(
artifacts: switch (json['artifacts']) {
null => [],
List<Object?> $1 => [for (final i in $1) Artifact.fromJson(i)],
_ => throw const FormatException('"artifacts" is not a list'),
},
executions: switch (json['executions']) {
null => [],
List<Object?> $1 => [for (final i in $1) Execution.fromJson(i)],
_ => throw const FormatException('"executions" is not a list'),
},
events: switch (json['events']) {
null => [],
List<Object?> $1 => [for (final i in $1) Event.fromJson(i)],
_ => throw const FormatException('"events" is not a list'),
},
);
}