toJsonLd method

  1. @override
Map<String, dynamic> toJsonLd()
override

Serialize SchemaInfectiousDisease to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'InfectiousDisease',
      'infectiousAgent': convertToJsonLd(infectiousAgent, [String]),
      'infectiousAgentClass':
          convertToJsonLd(infectiousAgentClass, [SchemaInfectiousAgentClass]),
      'transmissionMethod': convertToJsonLd(transmissionMethod, [String]),
    });