JSON-LD 是一种基于 JSON 且易于使用的关联数据格式,它定义了 context
的概念,用于指定类型和属性词汇。Gmail 支持 @context
为 schema.org
的 HTML 文档中嵌入的 JSON-LD 数据,如以下示例所示:
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "Person",
"name": "John Doe",
"jobTitle": "Graduate research assistant",
"affiliation": "University of Dreams",
"additionalName": "Johnny",
"url": "http://www.example.com",
"address": {
"@type": "PostalAddress",
"streetAddress": "1234 Peach Drive",
"addressLocality": "Wonderland",
"addressRegion": "Georgia"
}
}
</script>
如需查看 JSON-LD 语法的完整规范和要求,请访问 json-ld.org;此外,您还可以使用我们的架构验证器工具来试用 JSON-LD 并调试标记。