跳到主要内容
uencoder

Use JSON-LD 为 linked 数据和 SEO

JSON-LD (Linked 数据) serializes RDF triples 在 JSON, enabling 搜索 engines 到理解 entity relationships. Used 为 Schema.org structured 数据.

  1. 1

    JSON-LD represents linked 数据 as JSON 具有 @上下文该 maps terms 到 IRIs. 它是 recommended 格式化为 Schema.org structured 数据在 HTML. Search engines (Google, Bing) 解析 JSON-LD 到理解你的内容 — articles, products, events, reviews — 和 display rich 结果.

  2. 2
    JSON 格式化器 →

    格式化 your JSON-LD to ensure valid syntax. The @context, @type, and property names must be correct. Common types: Article, Product, Event, Organization, Person, BreadcrumbList. Format to catch typos and structural errors.

  3. 3
    JSON 验证器 →

    验证 the JSON-LD structure. Check that @context is a valid URL (typically "https://schema.org"), @type is a known Schema.org type, and required properties are present. Missing required properties can cause Google to ignore the structured data.

  4. 4

    Embed JSON-LD 在 HTML as <脚本类型="应用/ld+json"> 阻止在 <head>. Use Google's Rich 结果 Test 到验证. 常见 patterns: Article (headline, 作者, datePublished), Product (name, price, 可用性), BreadcrumbList (为 navigation). Use @图为 多个 entities 开 one page.

常见问题

JSON-LD vs Microdata vs RDFa?
Google recommends JSON-LD — 它是 easiest 到 implement 和 maintain. Microdata 和 RDFa embed structured 数据在 HTML attributes, 哪个是 harder 到 manage. JSON-LD 是 separate 脚本阻止该 能够是 generated 服务器-边和 injected.
什么是 @图?
@图是 used 当 page contains 多个 entities. Instead 的单个 object, use {"@上下文": "...", "@图": [entity1, entity2,。..]}. 每个 entity 在数组是 separate linked 数据节点. 此是 常见为 pages 具有多个 products 或 articles.

解决此任务的工作流

命名转换并验证
将标识符转为目标命名约定,再以 JSON 验证输出确认结构。
管道
通过 JSON 比较两份 YAML 配置
将 YAML 配置转换为 JSON,便于对结构化数值进行便于比较的差异对比。
管道
为 URL 传输编码 JSON 载荷
将 JSON 文档准备为 URL 参数:格式化、Base64 编码、再百分号编码——即嵌套参数解码链的精确逆过程。
管道
HJSON 转 JSON 格式化
格式化 HJSON 后转为标准 JSON。
管道
JS 格式化并 JSON 验证
格式化 JS 代码后验证为 JSON。
管道
格式化 JSON 并计算完整性校验和
格式化 JSON 文档并计算 CRC32 校验和,以检测后续任何修改。
管道
JSON 格式化并验证
一次性格式化 JSON 以便检视,并验证语法正确。
管道
生成 JSON Schema 并验证
从样本数据生成 JSON schema 后验证。
管道
格式化 JSON 并生成 TypeScript 接口
格式化 JSON 文档,再在一条链中推断出 TypeScript 接口定义。
管道
校验、格式化后将 JSON 转 YAML
将(可能被压缩的)JSON 配置转换为 YAML,在第一个节点捕获语法错误,而非生成细微错误的 YAML。
管道
JSON5 转 JSON 格式化
格式化 JSON5 后转为标准 JSON。
管道
JSONC 转 JSON 格式化
格式化 JSONC 后转为标准 JSON。
管道
解码并格式化 JWT 载荷
解析 JWT 令牌,提取其载荷,并格式化 JSON 以便检视。
管道
解析查询字符串并格式化 JSON
解析查询字符串为键值对后格式化为 JSON。
管道
TOML 转 JSON
将 TOML 配置文件解析为 JSON,供期望 JSON 输入的工具和 API 使用。
管道
经 JSON 将 TOML 转 YAML
将 TOML 配置文件转换为 YAML 格式,以 JSON 作为中间表示。
管道
解码嵌套 URL 参数(Base64 JSON)
将承载 URL 编码 Base64 JSON 的 URL 参数解包为可读的格式化 JSON。
管道
从 YAML 生成 TypeScript 接口
将 YAML 文档转换为 TypeScript 接口定义,以 JSON 作为中间格式。
管道
YAML 验证并格式化
将 YAML 转 JSON 以验证结构,再确认 JSON 格式正确。
管道

相关工具