JSON-具有多个位置的 LD JobPosting:"Missing '}' or object member name."

JSON-LD JobPosting with multiple locations: "Missing '}' or object member name."

我正在尝试将列出多个位置的 JobPosting 放在一起。在 developers.google.com 网站上列出的结构化数据类型定义中,它说:

If the job has multiple locations, add multiple jobLocation properties in an array. Google will choose the best location to display based on the job seeker's query.

但我继续收到错误消息:

  "jobLocation":[
{
    "@type":"Place",
    "address":{
        "@type":"PostalAddress",
        "streetAddress":"1366 N Mockingbird Ln.",
        "addressLocality":"Abilene",
        "addressRegion":"TX",
        "postalCode": "79603",
    }    
}
{
    "@type":"Place",
    "address":{
        "@type":"PostalAddress",
        "streetAddress":"3301 South 1st Street",
        "addressLocality":"Abilene",
        "addressRegion":"TX",
        "postalCode": "79603"
    }
}
]  

Missing '}' or object member name.

突出显示的项目是第一个 postalCode 之后的第一个右括号。

删除"postalCode": "79603",中的逗号,并添加逗号分隔数组中的项:

"jobLocation": [
  {},
  {}
] 

我认为您需要在 ] 之后加一个逗号 - 以下是它对我有用的方式:

        "jobLocation": [
        {
            "@type": "Place",
            "address": {
                "@type": "PostalAddress",
                "streetAddress": "XYZ",
                "addressLocality": "XYZ",
                "postalCode": "XYZ",
                "addressCountry": "DE"
            }
        },
        {
            "@type": "Place",
            "address": {
                "@type": "PostalAddress",
                "streetAddress": " XYZ",
                "addressLocality": "XYZ",
                "postalCode": "XYZ",
                "addressCountry": "DE"
            }
        }

    ],