You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

求助:从Google Search Central复制的Article结构化数据JSONLINT解析报错

结构化数据JSONLINT解析错误问题解决

你遇到的报错核心原因是:JSONLINT仅验证纯JSON格式内容,但你粘贴的代码包含了HTML的<script>标签,还混有HTML转义字符,具体问题点如下:

  • 代码开头的< script type = &quot;application/ld+json&quot; &gt;和结尾的&lt; /script&gt;是HTML标签,JSONLINT无法识别这类非JSON语法,这是触发报错的直接原因
  • 代码里的&quot;是HTML环境下的双引号转义实体,纯JSON里应该直接用普通双引号"
  • 标签里的多余空格(比如< script里的空格、属性值前后的空格)虽然不影响浏览器解析,但会干扰纯JSON验证工具的识别

修正后的纯JSON内容(可直接在JSONLINT验证)

{
    "@context": "https://schema.org",
    "@type": "NewsArticle",
    "headline": "Title of a News Article",
    "image": [
        "https://example.com/photos/1x1/photo.jpg",
        "https://example.com/photos/4x3/photo.jpg",
        "https://example.com/photos/16x9/photo.jpg"
    ],
    "datePublished": "2015-02-05T08:00:00+08:00",
    "dateModified": "2015-02-05T09:20:00+08:00",
    "author": [{
        "@type": "Person",
        "name": "Jane Doe",
        "url": "https://example.com/profile/janedoe123"
    }, {
        "@type": "Person",
        "name": "John Doe",
        "url": "https://example.com/profile/johndoe123"
    }]
}

如果要在Webflow里使用,只需要把修正后的JSON内容放到规范的<script>标签中间即可(注意标签不要有多余空格):

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "NewsArticle",
    "headline": "Title of a News Article",
    "image": [
        "https://example.com/photos/1x1/photo.jpg",
        "https://example.com/photos/4x3/photo.jpg",
        "https://example.com/photos/16x9/photo.jpg"
    ],
    "datePublished": "2015-02-05T08:00:00+08:00",
    "dateModified": "2015-02-05T09:20:00+08:00",
    "author": [{
        "@type": "Person",
        "name": "Jane Doe",
        "url": "https://example.com/profile/janedoe123"
    }, {
        "@type": "Person",
        "name": "John Doe",
        "url": "https://example.com/profile/johndoe123"
    }]
}
</script>

内容的提问来源于stack exchange,提问作者Andre Timms

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.20 06:55:04