ListRuntimesResponse.fromJson constructor

ListRuntimesResponse.fromJson(
  1. Object? j
)

Implementation

factory ListRuntimesResponse.fromJson(Object? j) {
  final json = j as Map<String, Object?>;
  return ListRuntimesResponse(
    runtimes: switch (json['runtimes']) {
      null => [],
      List<Object?> $1 => [
        for (final i in $1) ListRuntimesResponse_Runtime.fromJson(i),
      ],
      _ => throw const FormatException('"runtimes" is not a list'),
    },
  );
}