我试图整理一个列有多个地点的JobPosting
。在developers.google.com网站上列出的结构化数据类型定义中,它说:
如果作业有多个位置,请在数组中添加多个jobLocation属性。 Google会根据求职者的查询选择最佳展示位置。
但我仍然收到错误:
"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"
}
}
]
缺少'}'或对象成员名称。
突出显示的项目是第一个postalCode
之后的第一个右括号。
答案 0 :(得分:0)
删除"postalCode": "79603",
中的逗号,并添加逗号以分隔数组中的项目:
"jobLocation": [
{},
{}
]
答案 1 :(得分:0)
我认为您需要在逗号后加一个逗号-这对我来说是这样的:
"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"
}
}
],