JSON-LD

JSON-LD 是一种易于使用的基于 JSON 的关联数据格式,它定义了 context 的概念,用于指定类型和属性的词汇表。Gmail 支持 嵌入到 HTML 文档中的 JSON-LD 数据,使用 @contextschema.org,如以下示例所示:

<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 并调试标记。