我喜欢将 json-ld 添加到我的网站之前,我想将它添加到我的开发网站以进行测试
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Organization",
"url": "xxxxxxxxxxxxxxxx",
"contactPoint": [{
"@type": "ContactPoint",
"telephone": "+xx-xxx-xxx-xxxx",
"contactType": "customer service"
}]
}
</script>
我收到错误,指出缺少 '}' 或对象成员名称。这是什么错误,我正确地关闭了括号。如何修复它请帮助
这个片段完全没问题。它既是有效的 JSON 也是有效的 JSON-LD。你可以使用JSON-LD playground和Google 的结构化数据测试工具 进行测试。