toJsonLd method

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

Serialize SchemaLegislationObject to JSON-LD

Implementation

@override
Map<String, dynamic> toJsonLd() => removeEmpty({
      ...super.toJsonLd(),
      '@type': 'LegislationObject',
      'legislationLegalValue':
          convertToJsonLd(legislationLegalValue, [SchemaLegalValueLevel]),
      'associatedArticle':
          convertToJsonLd(associatedArticle, [SchemaNewsArticle]),
      'bitrate': convertToJsonLd(bitrate, [String]),
      'contentSize': convertToJsonLd(contentSize, [String]),
      'contentUrl': convertToJsonLd(contentUrl, [String]),
      'duration': convertToJsonLd(
          duration, [SchemaDuration, SchemaQuantitativeValue]),
      'embedUrl': convertToJsonLd(embedUrl, [String]),
      'encodesCreativeWork':
          convertToJsonLd(encodesCreativeWork, [SchemaCreativeWork]),
      'endTime': convertToJsonLd(endTime, [String]),
      'height':
          convertToJsonLd(height, [SchemaDistance, SchemaQuantitativeValue]),
      'ineligibleRegion': convertToJsonLd(
          ineligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
      'playerType': convertToJsonLd(playerType, [String]),
      'productionCompany':
          convertToJsonLd(productionCompany, [SchemaOrganization]),
      'regionsAllowed': convertToJsonLd(regionsAllowed, [SchemaPlace]),
      'requiresSubscription': convertToJsonLd(
          requiresSubscription, [SchemaMediaSubscription, bool]),
      'sha256': convertToJsonLd(sha256, [String]),
      'startTime': convertToJsonLd(startTime, [String]),
      'uploadDate': convertToJsonLd(uploadDate, [String]),
      'width':
          convertToJsonLd(width, [SchemaDistance, SchemaQuantitativeValue]),
    });