我正在尝试将一些常见问题解答作为结构化数据编写,但是使用验证器工具时,它告诉我我正在使用未指定的架构类型。我不明白这是怎么回事,因为我直接从Google的示例代码中复制了它,只是更改了内容。
"@context": "https://schema.org",
"@type": "FAQPage",
"mainEntity": [{
"@type": "Question",
"name": "Question Text?",
"acceptedAnswer": {
"@type": "Answer",
"text": "Answer text"
}
下一次验证您的JSON代码(您的代码抛出错误)。这是最常见的JSON错误之一(缺少关闭)。
https://jsonformatter.curiousconcept.com/
{
并添加结束}
&]
&}
。工作示例:
{
"@context":"https://schema.org",
"@type":"FAQPage",
"mainEntity":[
{
"@type":"Question",
"name":"John doe",
"acceptedAnswer":{
"@type":"Answer",
"text":"My answer"
}
}
]
}