Function$.fromJson constructor
Function$.fromJson(
- Object? j
Implementation
factory Function$.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Function$(
name: switch (json['name']) {
null => '',
Object $1 => decodeString($1),
},
args: switch (json['args']) {
null => [],
List<Object?> $1 => [for (final i in $1) Value.fromJson(i)],
_ => throw const FormatException('"args" is not a list'),
},
options: switch (json['options']) {
null => {},
Map<String, Object?> $1 => {
for (final e in $1.entries)
decodeString(e.key): Value.fromJson(e.value),
},
_ => throw const FormatException('"options" is not an object'),
},
);
}