在 JSON-LD 标记模式中实现“@graph”关键字

问题描述 投票:0回答:1

下面代码中“@graph”关键字的应用是否正确? 我在这里试图做的是建立产品“钢丝绳”和钢丝绳类型之间的关系。 我还想将产品组“钢丝绳”表示为产品类型的架构。 因此,“@graph”属性。 我的代码正确吗?

<script type="application/ld+json">
{
    "@context": "https://schema.org",
    "@type": "ProductGroup",
    "name": "Wire Rope",
    "@graph": {
        "@type": "Product",
        "name": "Wire Rope",
        "aggregateRating": {
            "@type": "AggregateRating",
            "ratingValue": "4.9",
            "reviewCount": "19"
        },
    }
    "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.9",
        "reviewCount": "19"
    },
    "description": "Various types of wire ropes for different applications.",
    "hasVariant": [
        {
            "@type": "Product",
            "name": "Stainless Steel SS wire rope",
            "image": "https://sviboindustries.in/wp-content/uploads/2023/06/ss-wire-rope.jpg",
            "description": "The SS wire rope is a strong and flexible cable made of stainless steel wires twisted together, commonly used for various applications such as lifting, rigging, and suspension due to its durability and resistance to corrosion.",
            "aggregateRating": {
                "@type": "AggregateRating",
                "ratingValue": "4.9",
                "reviewCount": "16"
            }
        },
        {
            "@type": "Product",
            "name": "PVC Coated wire rope",
            "image": "https://sviboindustries.in/wp-content/uploads/2023/05/pr-203.png",
            "description": "PVC coated wire rope is a type of cable consisting of stainless steel wires encased in a protective PVC (polyvinyl chloride) coating. This coating provides additional resistance to corrosion, abrasion, and weathering, making it suitable for outdoor and marine applications.",
            "aggregateRating": {
                "@type": "AggregateRating",
                "ratingValue": "4.7",
                "reviewCount": "21"
            }
        },
        {
            "@type": "Product",
            "name": "Galvanized wire rope",
            "image": "https://sviboindustries.in/wp-content/uploads/2023/05/galvanized-wire-rope-500x500-1.png",
            "description": "Galvanized wire rope is a cable made of steel wires that are coated with a layer of zinc through the process of galvanization.",
            "aggregateRating": {
                "@type": "AggregateRating",
                "ratingValue": "4.7",
                "reviewCount": "8"
            }
        },
        {
            "@type": "Product",
            "name": "Ungalvanized wire rope",
            "image": "https://sviboindustries.in/wp-content/uploads/2023/05/black-steel-wire-rope-500x500-1.jpg",
            "description": "Ungalvanized wire rope is a cable made of steel wires without a protective zinc coating.",
            "aggregateRating": {
                "@type": "AggregateRating",
                "ratingValue": "4.9",
                "reviewCount": "15"
            }
        }
    ]
}
</script>
html json schema json-ld
1个回答
0
投票

图表中的最后一个逗号位置错误。尝试一下

"@graph": {
    "@type": "Product",
    "name": "Wire Rope",
    "aggregateRating": {
        "@type": "AggregateRating",
        "ratingValue": "4.9",
        "reviewCount": "19"
    }
},

您想通过使用图表实现什么目标?

© www.soinside.com 2019 - 2024. All rights reserved.