FunctionCall.fromJson constructor
FunctionCall.fromJson(
- Object? j
Implementation
factory FunctionCall.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return FunctionCall(
id: switch (json['id']) {
null => '',
Object $1 => decodeString($1),
},
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
args: switch (json['args']) {
null => null,
Object $1 => protobuf.Struct.fromJson($1),
},
partialArgs: switch (json['partialArgs']) {
null => [],
List<Object?> $1 => [for (final i in $1) PartialArg.fromJson(i)],
_ => throw const FormatException('"partialArgs" is not a list'),
},
willContinue: switch (json['willContinue']) {
null => false,
Object $1 => decodeBool($1),
},
);
}