模式未指定类型

问题描述 投票:0回答:1

我正在尝试将一些常见问题解答作为结构化数据编写,但是使用验证器工具时,它告诉我我正在使用未指定的架构类型。我不明白这是怎么回事,因为我直接从Google的示例代码中复制了它,只是更改了内容。

  "@context": "https://schema.org",
  "@type": "FAQPage",
  "mainEntity": [{
    "@type": "Question",
    "name": "Question Text?",
    "acceptedAnswer": {
      "@type": "Answer",
      "text": "Answer text"
    }

“错误消息”

schema schema.org markup json-ld
1个回答
0
投票

期望结尾处的}(或“]”):

下一次验证您的JSON代码(您的代码抛出错误)。这是最常见的JSON错误之一(缺少关闭)。

enter image description herehttps://jsonformatter.curiousconcept.com/

{并添加结束}]}。工作示例:

{ 
   "@context":"https://schema.org",
   "@type":"FAQPage",
   "mainEntity":[ 
      { 
         "@type":"Question",
         "name":"John doe",
         "acceptedAnswer":{ 
            "@type":"Answer",
            "text":"My answer"
         }
      }
   ]
}

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.