首页 > 解决方案 > 车辆模式标记添加有效载荷范围?

问题描述

我正在尝试为车辆的模式标记添加有效载荷范围,不确定格式正确吗?

原来的:

    <script type="application/ld+json">
    {
      "@context": "https://schema.org/", 
      "@type": "Vehicle", 
      "manufacturer": "Manufacturer Name",
      "brand": "Brand Name",
      "model": "Model Name",
      "name": "Vehicle Full Name",
      "image": "https://www.example.com/image.jpg",
      "color": "Bespoke",
      "mileageFromOdometer": "0",
      "vehicleTransmission": "Manual or Automatic",
      "payload": "2000",
      "url": "https://www.example.com/productpage",
      "offers": {
      "@type": "AggregateOffer",
      "lowPrice": "38995",
      "highPrice": "41995",
      "priceCurrency": "GBP"
    }
    }
    </script> 

我对有效载荷范围进行了这样的尝试,但它似乎不是正确的语法:

      "payload": {
      "minValue": "1000",
      "maxValue": "2000",
      "unitCode" "KGM",
      }

谢谢 ...

标签: rangeschemapayload

解决方案


这是一个工作示例,我认为我的代码中出现了拼写错误:

    <script type="application/ld+json">
{
  "@context": "https://schema.org/", 
  "@type": "Vehicle", 
  "manufacturer": "Name of manufacturer",
  "brand": "Name of brand",
  "model": "Model name",
  "name": "Full name of vehicle",
  "image": "https://www.example.com/image.jpg",
  "description": "Some description here",
  "color": "Bespoke",
  "mileageFromOdometer": "0",
  "vehicleTransmission": "Manual or Automatic",
  "payload": {
  "@type": "QuantitativeValue",
  "minValue": 1000,
  "maxValue": 2000,
  "unitCode": "KGM"
  },
  "url": "https://www.example.com/product",
  "offers": {
  "@type": "AggregateOffer",
  "lowPrice": "38995",
  "highPrice": "41995",
  "priceCurrency": "GBP"
}
}
</script>

推荐阅读