Distribution_Exemplar.fromJson constructor
Distribution_Exemplar.fromJson(
- Object? j
Implementation
factory Distribution_Exemplar.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Distribution_Exemplar(
value: switch (json['value']) {
null => 0,
Object $1 => decodeDouble($1),
},
timestamp: switch (json['timestamp']) {
null => null,
Object $1 => Timestamp.fromJson($1),
},
attachments: switch (json['attachments']) {
null => [],
List<Object?> $1 => [for (final i in $1) Any.fromJson(i)],
_ => throw const FormatException('"attachments" is not a list'),
},
);
}