toJsonLd method
Serialize SchemaDemand to JSON-LD
Implementation
@override
Map<String, dynamic> toJsonLd() => removeEmpty({
'@context': 'https://schema.org',
'@type': 'Demand',
'acceptedPaymentMethod': convertToJsonLd(
acceptedPaymentMethod, [SchemaLoanOrCredit, SchemaPaymentMethod]),
'advanceBookingRequirement': convertToJsonLd(
advanceBookingRequirement, [SchemaQuantitativeValue]),
'areaServed': convertToJsonLd(areaServed,
[SchemaAdministrativeArea, SchemaGeoShape, SchemaPlace, String]),
'asin': convertToJsonLd(asin, [String, String]),
'availability': convertToJsonLd(availability, [SchemaItemAvailability]),
'availabilityEnds':
convertToJsonLd(availabilityEnds, [String, String, String]),
'availabilityStarts':
convertToJsonLd(availabilityStarts, [String, String, String]),
'availableAtOrFrom': convertToJsonLd(availableAtOrFrom, [SchemaPlace]),
'availableDeliveryMethod':
convertToJsonLd(availableDeliveryMethod, [SchemaDeliveryMethod]),
'businessFunction':
convertToJsonLd(businessFunction, [SchemaBusinessFunction]),
'deliveryLeadTime':
convertToJsonLd(deliveryLeadTime, [SchemaQuantitativeValue]),
'eligibleCustomerType':
convertToJsonLd(eligibleCustomerType, [SchemaBusinessEntityType]),
'eligibleDuration':
convertToJsonLd(eligibleDuration, [SchemaQuantitativeValue]),
'eligibleQuantity':
convertToJsonLd(eligibleQuantity, [SchemaQuantitativeValue]),
'eligibleRegion': convertToJsonLd(
eligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
'eligibleTransactionVolume': convertToJsonLd(
eligibleTransactionVolume, [SchemaPriceSpecification]),
'gtin': convertToJsonLd(gtin, [String, String]),
'gtin12': convertToJsonLd(gtin12, [String]),
'gtin13': convertToJsonLd(gtin13, [String]),
'gtin14': convertToJsonLd(gtin14, [String]),
'gtin8': convertToJsonLd(gtin8, [String]),
'includesObject':
convertToJsonLd(includesObject, [SchemaTypeAndQuantityNode]),
'ineligibleRegion': convertToJsonLd(
ineligibleRegion, [SchemaGeoShape, SchemaPlace, String]),
'inventoryLevel':
convertToJsonLd(inventoryLevel, [SchemaQuantitativeValue]),
'itemCondition':
convertToJsonLd(itemCondition, [SchemaOfferItemCondition]),
'itemOffered': convertToJsonLd(itemOffered, [
SchemaAggregateOffer,
SchemaCreativeWork,
SchemaEvent,
SchemaMenuItem,
SchemaProduct,
SchemaService,
SchemaTrip
]),
'mpn': convertToJsonLd(mpn, [String]),
'priceSpecification':
convertToJsonLd(priceSpecification, [SchemaPriceSpecification]),
'seller': convertToJsonLd(seller, [SchemaOrganization, SchemaPerson]),
'serialNumber': convertToJsonLd(serialNumber, [String]),
'sku': convertToJsonLd(sku, [String]),
'validFrom': convertToJsonLd(validFrom, [String, String]),
'validThrough': convertToJsonLd(validThrough, [String, String]),
'warranty': convertToJsonLd(warranty, [SchemaWarrantyPromise]),
'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]),
});