fromJson static method
Implementation
static ValueType fromJson(Map<String, dynamic> json) {
final type = json['type'];
if (type is! String) {
throw FormatException(
'No valid type value is in the provided JSON.',
json,
);
}
return _deserializationRegistry[type]?.call(json) ??
(throw FormatException('Unknown type: $type', json));
}