toJsonLd method

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

Serialize SchemaAggregateOffer to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'AggregateOffer',
      'highPrice': convertToJsonLd(highPrice, [String, num]),
      'lowPrice': convertToJsonLd(lowPrice, [String, num]),
      'offerCount': convertToJsonLd(offerCount, [int]),
      'offers': convertToJsonLd(offers, [SchemaDemand, SchemaOffer]),
    });