WireGroupEndpoint.fromJson constructor

WireGroupEndpoint.fromJson(
  1. Object? j
)

Implementation

factory WireGroupEndpoint.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return WireGroupEndpoint(
    interconnects: switch (json['interconnects']) {
      null => {},
      Map<String, Object?> $1 => {
        for (final e in $1.entries)
          decodeString(e.key): WireGroupEndpointInterconnect.fromJson(
            e.value,
          ),
      },
      _ => throw const FormatException('"interconnects" is not an object'),
    },
  );
}