5

The schema.org docs refer sometimes to "pointers". E.g. Product schema has the property isSimilarTo.

I do understand, that I could use a Productor a Service directly. E.g.:

<script type="application/ld+json">
{
  "@context": "http://schema.org/",
  "@type": "Product",
  "name": "BMW",
  "isSimilarTo": {
    "@type": "Product",
    "name": "Mercedes Benz"
  },
  "offers": {
    "@type": "Offer",
    "priceCurrency": "EUR",
    "price": "100000.00"
  }
}
</script>

Is this the only and the correct way using and interpreting the term 'pointer' in this context? For a pointer, I would rather expect some value (an ID or an URL or similar) just pointing to another product or service.

1
  • 1
    I removed your last question, as it’s not directly related to the primary question. If you want to provide multiple Product items for the isSimilarTo property, you can use an array (see example in my answer to another question). Commented Jan 17, 2017 at 13:30

1 Answer 1

6

Your example is correct, and it follows Schema.org’s recommendation for the expected value of the isSimilarTo property. But Schema.org allows URI values for each property, even for those that don’t explicitly list URL as expected value.

So you could also use:

  "isSimilarTo": {
    "@id": "https://example.com/products/mercedes-benz#this"
  },

Note that consumers (like Google) don’t necessarily follow these references. You could also use both ways: provide the data (or some of it) on the current page, and refer to the item’s URI:

   "isSimilarTo": {
    "@id": "https://example.com/products/mercedes-benz#this",
    "@type": "Product",
    "name": "Mercedes Benz",
    "url": "https://example.com/products/mercedes-benz"
  },
Sign up to request clarification or add additional context in comments.

3 Comments

Thanks @unor. Does the fragment identifier #this has any special meaning?
Again @unor: Could you point me to the part of the docs, where I can find this kind of information. I have difficulties to find the right documentation.
@Stefan: See "Expected types vs text." under Expected types, text, and URLs. // About #this: it’s a way to differentiate between the thing itself and the page about this thing. "this" has no special meaning, it’s just a convention (could also be "product" or whatever). To read more about this, see my answer to the question @id vs. URL for linking JSON-LD nodes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.