结构化数据测试工具中的JSON-LD错误:“缺少'}'或对象成员名称”

时间:2018-04-21 16:28:01

标签: json json-ld

我正在尝试修复JSON-LD字符串中的错误。但是,当我在结构化数据测试工具上运行测试时,它会显示

  

未分类的错误缺少'}'或对象成员名称。

<script type='application/ld+json'>
{
  "@context":"http:\/\/schema.org","@type":"WebSite","url":"https:\/\/www.example.com\/","name":"SiteTitle","creator":{"@type":"Thing","name":"name of the Name","accountablePerson":{"@type":"Person","name":"person name",}
}
</script>    

1 个答案:

答案 0 :(得分:3)

好吧,你的json无效。你有一个逗号并错过了一个键&#34;}&#34;

这是你的json修复:

{
   "@context":"http://schema.org",
   "@type":"WebSite",
   "url":"https://www.example.com/",
   "name":"SiteTitle",
   "creator":{
      "@type":"Thing",
      "name":"name of the Name",
      "accountablePerson":{
         "@type":"Person",
         "name":"person name"
      }
   }
}