(This is a self-answered question. It wasn't posted in this post since the user asked for microdata, not JSON-LD)
How do you use the schema.org property "Warranty", listed in https://schema.org/warranty?.
There're no examples provided, not even for JSON-LD format. For instance, the article on offers
provides examples like this:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Product",
"aggregateRating": {
"@type": "AggregateRating",
"bestRating": "100",
"ratingCount": "24",
"ratingValue": "87"
},
"image": "dell-30in-lcd.jpg",
"name": "Dell UltraSharp 30\" LCD Monitor",
"offers": {
"@type": "AggregateOffer",
"highPrice": "$1495",
"lowPrice": "$1250",
"offerCount": "8",
"offers": [
{
"@type": "Offer",
"url": "save-a-lot-monitors.com/dell-30.html"
},
{
"@type": "Offer",
"url": "jondoe-gadgets.com/dell-30.html"
}
]
}
}
</script>
The correct usage is as follows (somewhere inside your HTML code):
Tested on Google's Structured Data Testing Tool. You can check it too.
The organization says the
warranty
property must be insideOffer
orDemand
, and that it should have WarrantyPromise inside.They also say WarrantyPromise can have the properties
durationOfWarranty
andwarrantyScope
.For
durationOfWarranty
you must useQuantitativeValue
, which allowsvalue
to be used.For
warrantyScope
you must useWarrantyScope
, which allowsdescription
to be used.Finally, they talk something about
warrantyPromise
(notWarrantyPromise
) stating thatWarrantyPromise
property must be insidewarrantyPromise
.