7
我目前正在致力于在/about-page-中添加Web应用程序的结构化数据。我想添加一个属性。在下面的代码中,我使用了name
和value
(正如我在schema.org中看到的)。JSON-LD:是必需的值的名称?
问:难道我只有value
使用没有name
,并设置如Modularity
为value
拖放说明?
<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>
(1)请注意,Schema.org类型是区分大小写的。所以你必须使用'PropertyValue'而不是'propertyValue'等。(2)你必须为'additionalProperty'值使用一个数组。 – unor
(1)它是,但如果你使用JSON-LD,你可能会留下第一个字母不是大写字母。 –
是什么让你觉得呢?如果使用“@type”:“propertyValue”,则术语URI是“http:// schema.org/propertyValue”,它与“http:// schema.org/PropertyValue”不同(后者是有效的Schema.org类型,前者不)。 – unor