COSESignedMessage.fromJson constructor

COSESignedMessage.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory COSESignedMessage.fromJson(Map<String, dynamic> json) {
  final type = COSESignedMessageType.fromName(json.keys.firstOrNull);
  return switch (type) {
    COSESignedMessageType.coseSign => COSESign.fromJson(json),
    COSESignedMessageType.coseSign1 => COSESign1.fromJson(json)
  };
}