fromJson static method
Implementation
static ExportedKey fromJson(Map<String, Object?> json) => ExportedKey(
catalog: json['catalog'] as String? ?? '',
key: json['key'] as String? ?? '',
values: _strings(json['values']),
representative: switch (json['representative']) {
Map shot => ExportedShot.fromJson(shot.cast<String, Object?>()),
_ => null,
},
occurrences: [
for (var shot in json['occurrences'] as List? ?? const [])
if (shot is Map) ExportedShot.fromJson(shot.cast<String, Object?>()),
],
maxLength: switch (json['maxLength']) {
Map block => ExportedMaxLength.fromJson(block.cast<String, Object?>()),
_ => null,
},
);