LdProofVcDetailOptions.fromJson constructor
LdProofVcDetailOptions.fromJson(
- dynamic jsonObject
Implementation
LdProofVcDetailOptions.fromJson(dynamic jsonObject) {
var options = credentialToMap(jsonObject);
if (options.containsKey('proofType')) {
proofType = options['proofType'];
} else {
throw FormatException('proofType is needed in Options Object');
}
proofPurpose = options['proofPurpose'];
if (options.containsKey('created')) {
created = DateTime.parse(options['created']);
}
challenge = options['challenge'];
domain = options['domain'];
if (options.containsKey('credentialStatus')) {
Map<String, dynamic> tmp = options['credentialStatus'];
if (tmp.containsKey('type')) {
credentialStatusType = tmp['type'];
} else {
throw FormatException('type property is needed for credential Status');
}
}
}