我正在尝试修复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>
答案 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"
}
}
}