toJsonLd method

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

Serialize SchemaActionAccessSpecification to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'ActionAccessSpecification',
      'availabilityEnds': convertToJsonLd(availabilityEnds, [String]),
      'availabilityStarts': convertToJsonLd(availabilityStarts, [String]),
      'category': convertToJsonLd(category, [
        SchemaCategoryCode,
        SchemaPhysicalActivityCategory,
        String,
        SchemaThing
      ]),
      'eligibleRegion': convertToJsonLd(
          eligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
      'expectsAcceptanceOf':
          convertToJsonLd(expectsAcceptanceOf, [SchemaOffer]),
      'ineligibleRegion': convertToJsonLd(
          ineligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
      'requiresSubscription': convertToJsonLd(
          requiresSubscription, [SchemaMediaSubscription, bool]),
    });