IssuerProperty.fromJson constructor
IssuerProperty.fromJson(
- dynamic jsonObject
Implementation
IssuerProperty.fromJson(dynamic jsonObject) {
var map = credentialToMap(jsonObject);
if (map.containsKey('id')) {
id = map['id'];
} else {
throw Exception('id property needed in issuerProperty');
}
name = map['name'];
if (map.containsKey('styles')) {
var stylesObject = map['styles'];
if (stylesObject is String) {
styles = stylesObject;
} else if (stylesObject is Map) {
styles = EntityStyles.fromJson(stylesObject);
} else {
throw Exception('unknown datatype for styles Property');
}
}
}