toJsonLd method
Serialize SchemaLegislation to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
'@context': 'https://schema.org',
'@type': 'Legislation',
'jurisdiction':
convertToJsonLd(jurisdiction, [SchemaAdministrativeArea, String]),
'legislationApplies':
convertToJsonLd(legislationApplies, [SchemaLegislation]),
'legislationChanges':
convertToJsonLd(legislationChanges, [SchemaLegislation]),
'legislationConsolidates':
convertToJsonLd(legislationConsolidates, [SchemaLegislation]),
'legislationDate': convertToJsonLd(legislationDate, [String]),
'legislationDateVersion':
convertToJsonLd(legislationDateVersion, [String]),
'legislationIdentifier':
convertToJsonLd(legislationIdentifier, [String, String]),
'legislationJurisdiction': convertToJsonLd(
legislationJurisdiction, [SchemaAdministrativeArea, String]),
'legislationLegalForce':
convertToJsonLd(legislationLegalForce, [SchemaLegalForceStatus]),
'legislationPassedBy': convertToJsonLd(
legislationPassedBy, [SchemaOrganization, SchemaPerson]),
'legislationResponsible': convertToJsonLd(
legislationResponsible, [SchemaOrganization, SchemaPerson]),
'legislationTransposes':
convertToJsonLd(legislationTransposes, [SchemaLegislation]),
'legislationType':
convertToJsonLd(legislationType, [SchemaCategoryCode, String]),
'about': convertToJsonLd(about, [SchemaThing]),
'abstract': convertToJsonLd(abstract, [String]),
'accessMode': convertToJsonLd(accessMode, [String]),
'accessModeSufficient':
convertToJsonLd(accessModeSufficient, [SchemaItemList]),
'accessibilityAPI': convertToJsonLd(accessibilityAPI, [String]),
'accessibilityControl': convertToJsonLd(accessibilityControl, [String]),
'accessibilityFeature': convertToJsonLd(accessibilityFeature, [String]),
'accessibilityHazard': convertToJsonLd(accessibilityHazard, [String]),
'accessibilitySummary': convertToJsonLd(accessibilitySummary, [String]),
'accountablePerson': convertToJsonLd(accountablePerson, [SchemaPerson]),
'acquireLicensePage':
convertToJsonLd(acquireLicensePage, [SchemaCreativeWork, String]),
'aggregateRating':
convertToJsonLd(aggregateRating, [SchemaAggregateRating]),
'alternativeHeadline': convertToJsonLd(alternativeHeadline, [String]),
'archivedAt': convertToJsonLd(archivedAt, [String, SchemaWebPage]),
'assesses': convertToJsonLd(assesses, [SchemaDefinedTerm, String]),
'associatedMedia':
convertToJsonLd(associatedMedia, [SchemaMediaObject]),
'audience': convertToJsonLd(audience, [SchemaAudience]),
'audio': convertToJsonLd(
audio, [SchemaAudioObject, SchemaClip, SchemaMusicRecording]),
'author': convertToJsonLd(author, [SchemaOrganization, SchemaPerson]),
'award': convertToJsonLd(award, [String]),
'awards': convertToJsonLd(awards, [String]),
'character': convertToJsonLd(character, [SchemaPerson]),
'citation': convertToJsonLd(citation, [SchemaCreativeWork, String]),
'comment': convertToJsonLd(comment, [SchemaComment]),
'commentCount': convertToJsonLd(commentCount, [int]),
'conditionsOfAccess': convertToJsonLd(conditionsOfAccess, [String]),
'contentLocation': convertToJsonLd(contentLocation, [SchemaPlace]),
'contentRating': convertToJsonLd(contentRating, [SchemaRating, String]),
'contentReferenceTime': convertToJsonLd(contentReferenceTime, [String]),
'contributor':
convertToJsonLd(contributor, [SchemaOrganization, SchemaPerson]),
'copyrightHolder': convertToJsonLd(
copyrightHolder, [SchemaOrganization, SchemaPerson]),
'copyrightNotice': convertToJsonLd(copyrightNotice, [String]),
'copyrightYear': convertToJsonLd(copyrightYear, [int]),
'correction': convertToJsonLd(
correction, [SchemaCorrectionComment, String, String]),
'countryOfOrigin': convertToJsonLd(countryOfOrigin, [SchemaCountry]),
'creativeWorkStatus':
convertToJsonLd(creativeWorkStatus, [SchemaDefinedTerm, String]),
'creator': convertToJsonLd(creator, [SchemaOrganization, SchemaPerson]),
'creditText': convertToJsonLd(creditText, [String]),
'dateCreated': convertToJsonLd(dateCreated, [String, String]),
'dateModified': convertToJsonLd(dateModified, [String, String]),
'datePublished': convertToJsonLd(datePublished, [String, String]),
'digitalSourceType': convertToJsonLd(
digitalSourceType, [SchemaIPTCDigitalSourceEnumeration]),
'discussionUrl': convertToJsonLd(discussionUrl, [String]),
'editEIDR': convertToJsonLd(editEIDR, [String, String]),
'editor': convertToJsonLd(editor, [SchemaPerson]),
'educationalAlignment':
convertToJsonLd(educationalAlignment, [SchemaAlignmentObject]),
'educationalLevel': convertToJsonLd(
educationalLevel, [SchemaDefinedTerm, String, String]),
'educationalUse':
convertToJsonLd(educationalUse, [SchemaDefinedTerm, String]),
'encoding': convertToJsonLd(encoding, [SchemaMediaObject]),
'encodingFormat': convertToJsonLd(encodingFormat, [String, String]),
'encodings': convertToJsonLd(encodings, [SchemaMediaObject]),
'exampleOfWork': convertToJsonLd(exampleOfWork, [SchemaCreativeWork]),
'expires': convertToJsonLd(expires, [String, String]),
'fileFormat': convertToJsonLd(fileFormat, [String, String]),
'funder': convertToJsonLd(funder, [SchemaOrganization, SchemaPerson]),
'funding': convertToJsonLd(funding, [SchemaGrant]),
'genre': convertToJsonLd(genre, [String, String]),
'hasPart': convertToJsonLd(hasPart, [SchemaCreativeWork]),
'headline': convertToJsonLd(headline, [String]),
'inLanguage': convertToJsonLd(inLanguage, [SchemaLanguage, String]),
'interactionStatistic':
convertToJsonLd(interactionStatistic, [SchemaInteractionCounter]),
'interactivityType': convertToJsonLd(interactivityType, [String]),
'interpretedAsClaim':
convertToJsonLd(interpretedAsClaim, [SchemaClaim]),
'isAccessibleForFree': convertToJsonLd(isAccessibleForFree, [bool]),
'isBasedOn': convertToJsonLd(
isBasedOn, [SchemaCreativeWork, SchemaProduct, String]),
'isBasedOnUrl': convertToJsonLd(
isBasedOnUrl, [SchemaCreativeWork, SchemaProduct, String]),
'isFamilyFriendly': convertToJsonLd(isFamilyFriendly, [bool]),
'isPartOf': convertToJsonLd(isPartOf, [SchemaCreativeWork, String]),
'keywords':
convertToJsonLd(keywords, [SchemaDefinedTerm, String, String]),
'learningResourceType':
convertToJsonLd(learningResourceType, [SchemaDefinedTerm, String]),
'license': convertToJsonLd(license, [SchemaCreativeWork, String]),
'locationCreated': convertToJsonLd(locationCreated, [SchemaPlace]),
'mainEntity': convertToJsonLd(mainEntity, [SchemaThing]),
'maintainer':
convertToJsonLd(maintainer, [SchemaOrganization, SchemaPerson]),
'material': convertToJsonLd(material, [SchemaProduct, String, String]),
'materialExtent':
convertToJsonLd(materialExtent, [SchemaQuantitativeValue, String]),
'mentions': convertToJsonLd(mentions, [SchemaThing]),
'offers': convertToJsonLd(offers, [SchemaDemand, SchemaOffer]),
'pattern': convertToJsonLd(pattern, [SchemaDefinedTerm, String]),
'position': convertToJsonLd(position, [String, int]),
'producer':
convertToJsonLd(producer, [SchemaOrganization, SchemaPerson]),
'provider':
convertToJsonLd(provider, [SchemaOrganization, SchemaPerson]),
'publication': convertToJsonLd(publication, [SchemaPublicationEvent]),
'publisher':
convertToJsonLd(publisher, [SchemaOrganization, SchemaPerson]),
'publisherImprint':
convertToJsonLd(publisherImprint, [SchemaOrganization]),
'publishingPrinciples':
convertToJsonLd(publishingPrinciples, [SchemaCreativeWork, String]),
'recordedAt': convertToJsonLd(recordedAt, [SchemaEvent]),
'releasedEvent':
convertToJsonLd(releasedEvent, [SchemaPublicationEvent]),
'review': convertToJsonLd(review, [SchemaReview]),
'reviews': convertToJsonLd(reviews, [SchemaReview]),
'schemaVersion': convertToJsonLd(schemaVersion, [String, String]),
'sdDatePublished': convertToJsonLd(sdDatePublished, [String]),
'sdLicense': convertToJsonLd(sdLicense, [SchemaCreativeWork, String]),
'sdPublisher':
convertToJsonLd(sdPublisher, [SchemaOrganization, SchemaPerson]),
'size': convertToJsonLd(size, [
SchemaDefinedTerm,
SchemaQuantitativeValue,
SchemaSizeSpecification,
String
]),
'sourceOrganization':
convertToJsonLd(sourceOrganization, [SchemaOrganization]),
'spatial': convertToJsonLd(spatial, [SchemaPlace]),
'spatialCoverage': convertToJsonLd(spatialCoverage, [SchemaPlace]),
'sponsor': convertToJsonLd(sponsor, [SchemaOrganization, SchemaPerson]),
'teaches': convertToJsonLd(teaches, [SchemaDefinedTerm, String]),
'temporal': convertToJsonLd(temporal, [String, String]),
'temporalCoverage':
convertToJsonLd(temporalCoverage, [String, String, String]),
'text': convertToJsonLd(text, [String]),
'thumbnail': convertToJsonLd(thumbnail, [SchemaImageObject]),
'thumbnailUrl': convertToJsonLd(thumbnailUrl, [String]),
'timeRequired': convertToJsonLd(timeRequired, [SchemaDuration]),
'translationOfWork':
convertToJsonLd(translationOfWork, [SchemaCreativeWork]),
'translator':
convertToJsonLd(translator, [SchemaOrganization, SchemaPerson]),
'typicalAgeRange': convertToJsonLd(typicalAgeRange, [String]),
'usageInfo': convertToJsonLd(usageInfo, [SchemaCreativeWork, String]),
'version': convertToJsonLd(version, [String, int]),
'video': convertToJsonLd(video, [SchemaClip, SchemaVideoObject]),
'workExample': convertToJsonLd(workExample, [SchemaCreativeWork]),
'workTranslation':
convertToJsonLd(workTranslation, [SchemaCreativeWork]),
'additionalType': convertToJsonLd(additionalType, [String, String]),
'alternateName': convertToJsonLd(alternateName, [String]),
'description': convertToJsonLd(description, [String, SchemaTextObject]),
'disambiguatingDescription':
convertToJsonLd(disambiguatingDescription, [String]),
'identifier':
convertToJsonLd(identifier, [SchemaPropertyValue, String, String]),
'image': convertToJsonLd(image, [SchemaImageObject, String]),
'mainEntityOfPage':
convertToJsonLd(mainEntityOfPage, [SchemaCreativeWork, String]),
'name': convertToJsonLd(name, [String]),
'potentialAction': convertToJsonLd(potentialAction, [SchemaAction]),
'sameAs': convertToJsonLd(sameAs, [String]),
'subjectOf':
convertToJsonLd(subjectOf, [SchemaCreativeWork, SchemaEvent]),
'url': convertToJsonLd(url, [String]),
});