【问题标题】:JSON-LD error in Structured Data Testing Tool: "Missing '}' or object member name"结构化数据测试工具中的 JSON-LD 错误:“缺少 '}' 或对象成员名称”
【发布时间】:2018-04-21 16:28:00
【问题描述】:

我正在尝试修复 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>    

【问题讨论】:

    标签: json json-ld


    【解决方案1】:

    好吧,您的 json 无效。你有一个逗号,错过了一个关键“}”

    这是你的 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"
          }
       }
    }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2018-03-19
      • 2020-02-06
      • 1970-01-01
      • 2016-12-15
      • 1970-01-01
      • 1970-01-01
      • 2020-03-11
      相关资源
      最近更新 更多