DiscloseMessage.fromJson constructor
DiscloseMessage.fromJson(
- dynamic jsonObject
Implementation
DiscloseMessage.fromJson(super.jsonObject) : super.fromJson() {
if (type != DidcommMessages.discoverFeatureDisclose) {
throw Exception('Wrong message type');
}
if (body.containsKey('disclosures')) {
var d = body['disclosures'] as List;
disclosures = [];
for (var dis in d) {
disclosures.add(Disclosure.fromJson(dis));
}
} else {
throw FormatException(
'disclosures property is needed in Disclosure Message');
}
}