toJson method
Implementation
@override
Object toJson() => {
if (name.isNotDefault) 'name': name,
if (type case final type?) 'type': type.toJson(),
if (uri.isNotDefault) 'uri': uri,
if (properties.isNotDefault)
'properties': {
for (final e in properties.entries) e.key: e.value.toJson(),
},
if (customProperties.isNotDefault)
'customProperties': {
for (final e in customProperties.entries) e.key: e.value.toJson(),
},
if (metadata case final metadata?) 'metadata': metadata.toJson(),
};