schema.org - Schema.org 的“专业”属性因问答类型而失败:“Google 无法识别问题类型的对象的属性专业。”
问题描述
我正在尝试添加specialty
属性,遵循使用 JSON-LD 的 Schema.org 文档。根据QAPage
文档,specialty
确实是此模式类型的有效值。
问题是当我使用 Google 的结构化数据测试工具进行验证时,它会吐出这个错误:
(
specialty
Google 无法识别类型对象的属性Question
。)
现在,Schema.org 部分由 Google 运营,所以我不认为这是他们的错误。很确定它可能是 JSON-LD 语法,但我整个早上都在尝试不同的东西。任何人都可以阐明这个问题吗?
{
"@context": "https://schema.org",
"@type": "QAPage",
"mainEntity": {
"@type": "Question",
"name": "How many ounces are there in a pound?",
"text": "I have taken up a new interest in baking and keep running across directions in ounces and pounds. I have to translate between them and was wondering how many ounces are in a pound?",
"specialty": "SEO", //ISSUE LINE
"answerCount": 3,
"upvoteCount": 26,
"dateCreated": "2016-07-23T21:11Z",
"author": {
"@type": "Person",
"name": "New Baking User"
},
"acceptedAnswer": {
"@type": "Answer",
"text": "1 pound (lb) is equal to 16 ounces (oz).",
"dateCreated": "2016-11-02T21:11Z",
"upvoteCount": 1337,
"url": "https://example.com/question1#acceptedAnswer",
"author": {
"@type": "Person",
"name": "SomeUser"
}
},
"suggestedAnswer": [
{
"@type": "Answer",
"text": "Are you looking for ounces or fluid ounces? If you are looking for fluid ounces there are 15.34 fluid ounces in a pound of water.",
"dateCreated": "2016-11-02T21:11Z",
"upvoteCount": 42,
"url": "https://example.com/question1#suggestedAnswer1",
"author": {
"@type": "Person",
"name": "AnotherUser"
}
}, {
"@type": "Answer",
"text": " I can't remember exactly, but I think 18 ounces in a lb. You might want to double check that.",
"dateCreated": "2016-11-06T21:11Z",
"upvoteCount": 0,
"url": "https://example.com/question1#suggestedAnswer2",
"author": {
"@type": "Person",
"name": "ConfusedUser"
}
}
]
}
}
解决方案
推荐阅读
- javascript - 如何检查 goBack() 函数在反应导航中是否可行?
- keystonejs - 如何在 KeystoneJS 的列表中添加新字段
- c - 我的代码返回 0 而不是正确的数字
- sql - 返回 student_ids,其中每个类别中至少有一个
- c# - 如何调用 HashPassword 并将用户密码存储到数据库?
- android-studio - Android - (Android Studio) - 创建类似于 TODO,但颜色和名称不同?
- javascript - 将 Vuesax 侧边栏组件与 spa 一起使用,并希望自动检测页面并设置活动属性
- azure - 自动向 Azure DevOps 自托管代理添加功能
- javascript - 显示具有 ajax 功能的数据库的 php 和 html 130.000 条记录
- actions-on-google - Actions SDK:同一 queryPattern 中的两个 org.schema.type.Text 实例失败