toJsonLd method
Serialize SchemaPostalAddress to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
'@context': 'https://schema.org',
'@type': 'PostalAddress',
'addressCountry':
convertToJsonLd(addressCountry, [SchemaCountry, String]),
'addressLocality': convertToJsonLd(addressLocality, [String]),
'addressRegion': convertToJsonLd(addressRegion, [String]),
'postOfficeBoxNumber': convertToJsonLd(postOfficeBoxNumber, [String]),
'postalCode': convertToJsonLd(postalCode, [String]),
'streetAddress': convertToJsonLd(streetAddress, [String]),
'areaServed': convertToJsonLd(areaServed,
[SchemaAdministrativeArea, SchemaGeoShape, SchemaPlace, String]),
'availableLanguage':
convertToJsonLd(availableLanguage, [SchemaLanguage, String]),
'contactOption':
convertToJsonLd(contactOption, [SchemaContactPointOption]),
'contactType': convertToJsonLd(contactType, [String]),
'email': convertToJsonLd(email, [String]),
'faxNumber': convertToJsonLd(faxNumber, [String]),
'hoursAvailable':
convertToJsonLd(hoursAvailable, [SchemaOpeningHoursSpecification]),
'productSupported':
convertToJsonLd(productSupported, [SchemaProduct, String]),
'serviceArea': convertToJsonLd(serviceArea,
[SchemaAdministrativeArea, SchemaGeoShape, SchemaPlace]),
'telephone': convertToJsonLd(telephone, [String]),
'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]),
});