JSON-LD 格式的结构 Schema.org 多分支多部门

Structure Schema.org in JSON-LD format for multi branch multi departments

我很确定这纯粹是一个语法问题,但我正在尝试为有 2 个分支且每个分支都有的客户设置一些 JSON-LD 格式的 Schema.org 2个主要部门。

我遇到的问题是每个部门的开放时间。这是我的代码:

{
  "@context": {
    "@vocab": "http://schema.org/"
  },
  "@graph": [{
      "@id": "http://example.com",
      "@type": "Organization",
      "name": "Group Name",
      "url": "http://example.com",
      "logo": "http://example.com/images/logo.png",
      "image": "http://example.com/images/logo.png",
      "description": "Some information about the customer",
      "currenciesAccepted": "GBP",
      "sameAs": ["https://www.facebook.com/[customers facebook page/"]
    },
    {
      "@type": "AutoDealer",
      "parentOrganization": {
        "name": "Group Name"
      },
      "name": "Banch 1",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "street",
        "addressLocality": "locality",
        "addressRegion": "region",
        "postalCode": "post code",
        "telephone": "phone number"
      },
      "department": [{
          "name": "Sales Department",
          "openingHours": ["Mo-Fr 9:00 - 19:00", "Sa 9:00 - 17:00"]
        },
        {
          "name": "Service Department",
          "openingHours": ["Mo-Fr 7:30 - 18:00", "Sa 9:00 - 12:00"]
        }
      ],
      "hasmap": "google map url"
    },
    {
      "@type": "AutoDealer",
      "parentOrganization": {
        "name": "Group Name"
      },
      "name": "Branch 2",
      "address": {
        "@type": "PostalAddress",
        "streetAddress": "street",
        "addressLocality": "locality",
        "addressRegion": "region",
        "postalCode": "post code",
        "telephone": "phone number"
      },
      "department": [{
          "name": "Sales Department",
          "openingHours": ["Mo-Fr 9:00 - 19:00", "Sa 9:00 - 17:00"]
        },
        {
          "name": "Service Department",
          "openingHours": ["Mo-Fr 7:30 - 18:00", "Sa 9:00 - 12:00"]
        }
      ],
      "hasmap": "Google map url"
    }
  ]
}

当我在 Google 的结构化数据测试工具上进行测试时,出现错误:

The property openingHours is not recognized by Google for an object of type Organization.

openingHours 属性 可用于 CivicStructureLocalBusiness 类型。

您没有指定您提供此 属性 的节点类型:

{
  "name": "Sales Department",
  "openingHours": ["Mo-Fr 9:00 - 19:00", "Sa 9:00 - 17:00"]
},

Google 的测试工具似乎假定此节点属于 Organization 类型,因为它是 department 属性 期望的值。因为 openingHours 不能用在 Organization 上(但在它的子类型 LocalBusiness 上),Google 给出了这个错误。

因此,要解决此问题,请添加预期的类型,例如类似于:

{
  "@type": "AutoDealer",
  "name": "Sales Department",
  "openingHours": ["Mo-Fr 9:00 - 19:00", "Sa 9:00 - 17:00"]
},