7

I'm currently working on adding a structured data of the web application in /about-page. I want to add there a property. In the following code, I'm using both the name and value (as I saw in the schema.org).

Q: Do I have to use only value without the name, and set eg Modularity as a value and drop the description?

<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "product",
"name":"Product_name",
"additionalProperty":
    {
    "@type":"propertyValue",
    "name":"Main features",
    "value":
        [
            {
            "@type":"propertyValue",
            "name": "Detailed documentation",
            "value": "description_of_the_documentation"
            },  
            {
            "@type":"propertyValue",
            "name": "Fully responsive",
            "value": "description_of_the_responsiveness"
            }
        ],

    "@type":"propertyValue",
    "name":"Other features",
    "value":
        [
            {
            "@type":"propertyValue",
            "name": "Modularity",
            "value": "description_of_the_modularity"
            },  
            {
            "@type":"propertyValue",
            "name": "Frequent updates",
            "value": "description_of_the_updates"
            }
        ]
    }
}
</script>
Boann
  • 48,794
  • 16
  • 117
  • 146
  • 1
    (1) Note that Schema.org types are case-sensitive. So you have to use `PropertyValue` instead of `propertyValue` etc. (2) You have to use an array for the `additionalProperty` values. – unor Mar 02 '17 at 16:55
  • (1) It is, but if you're using JSON-LD, you may leave the first letter not capital. – Michał T. Krawczyk Mar 06 '17 at 15:35
  • What makes you think that? If you use `"@type":"propertyValue"`, the term URI is `http://schema.org/propertyValue`, which is different from `http://schema.org/PropertyValue` (the latter is a valid Schema.org type, the former not). – unor Mar 06 '17 at 16:14
  • I've tested this on Google Structured Data Testing Tool, and there were no errors. You think it's possible, that google does not report case sensitiveness as an error, but in reality it is? Also in the search console, it is not reported as an error. – Michał T. Krawczyk Mar 07 '17 at 08:32
  • I see - Google’s SDTT seems to ignore such errors for Schema.org. But that doesn’t make it valid, of course. It will also not work for other consumers than Google. It’s easy to see why case matters: When creating your own vocabulary, you could define two types that mean different things, and whose names only differ in case. Consumers *have* to differentiate, otherwise they interpret the data wrongly. -- In the case of Schema.org, types always start with an uppercase letter (and properties with lowercase), so it’s possible for SDTT to ignore errors if they want to, but I wouldn’t rely on it. – unor Mar 07 '17 at 09:47

1 Answers1

3

You could use a Boolean value for the value property.

{
  "@type": "PropertyValue",
  "name": "Modularity",
  "value": true
}

If you want to describe the feature, use the description property in addition.

unor
  • 92,415
  • 26
  • 211
  • 360