toJsonLd method
Serialize SchemaDrugCost to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
...super.toJsonLd(),
'@type': 'DrugCost',
'applicableLocation':
convertToJsonLd(applicableLocation, [SchemaAdministrativeArea]),
'costCategory': convertToJsonLd(costCategory, [SchemaDrugCostCategory]),
'costCurrency': convertToJsonLd(costCurrency, [String]),
'costOrigin': convertToJsonLd(costOrigin, [String]),
'costPerUnit':
convertToJsonLd(costPerUnit, [SchemaQualitativeValue, String, num]),
'drugUnit': convertToJsonLd(drugUnit, [String]),
});