fromJson static method
Restores a reference produced by toJson.
Implementation
static Reference fromJson(Map<String, Object?> json) {
return switch (json['type']) {
'verse' => VerseRef.fromJson(json),
'range' => VerseRangeRef.fromJson(json),
final type => throw FormatException('unknown reference type: $type'),
};
}