JoseObject.fromJson constructor
Constructs a JsonWebSignature or JsonWebEncryption from its json representation.
Implementation
factory JoseObject.fromJson(Map<String, dynamic> json) {
if (json.containsKey('payload')) return JsonWebSignature.fromJson(json);
if (json.containsKey('ciphertext')) return JsonWebEncryption.fromJson(json);
throw ArgumentError.value(
json, 'json', 'Not a valid `JsonWebSignature` or `JsonWebEncryption`');
}