toJsonLd method

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

Serialize SchemaServicePeriod to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'ServicePeriod',
      'businessDays': convertToJsonLd(
          businessDays, [SchemaDayOfWeek, SchemaOpeningHoursSpecification]),
      'cutoffTime': convertToJsonLd(cutoffTime, [String]),
      'duration': convertToJsonLd(
          duration, [SchemaDuration, SchemaQuantitativeValue]),
    });