无法在SDTT中验证JobPosting

时间:2017-08-21 10:49:11

标签: schema.org json-ld

对Schema.org的JobPosting感到沮丧。我发现谷歌结构化数据测试工具说:

  

100000(属性baseSalary.itemtype的值无效。)

我尝试在JobPosting内部或外部使用此内容,如下所示:

 "@type":"MonetaryAmount",
     "EmployeeRole":{                       
    "baseSalary": "100000"                         
        }  

但是,我发现了一个以上的问题。

<script type="application/ld+json">{
  "@context": "http://schema.org",  
  "@type": "JobPosting",  


    "baseSalary":"100000",


        "datePosted":"2017-06-18T15:14:57+00:00",
        "validThrough":"2017-12-31T00:00:00+00:00",
        "title":"Sales And Marketing Manager",
        "description":"Responsible for Corporate and Travel Agent Room Sales for the hotel",
        "educationRequirements":"S-1 Management",//educationRequirements
        "employmentType":"Kontrak 1 Tahun",//employmentType
        "experienceRequirements":"100 Tahun",//experienceRequirements
        "industry":"Perpajakan Daerah Sumedang",//industry
        "qualifications":"Single, Fresh Graduates dan suka ternak bebek",//qualifications
        "responsibilities":"Tukang mbersihin kadang embek",//responsibilities
        "skills":"Bisa menjahit, ngetik 40 jari",//skills
        "workHours":"Jam 10 s/d 70",//workHours
        "hiringOrganization":{
        "@type":"Organization",
            "name":"Equity Jimbaran Resort And Villa",
            "sameAs":"http://equityhoteljimbaran.com",
            "url":"http://equityhoteljimbaran.com"
            },
                    "jobLocation":{
                    "@type":"Place",
                        "address":{
                            "@type":"PostalAddress",
                                "addressRegion":"Bali",
                                "addressCountry":"ID",
                                "streetAddress":"Jl.Muara 3, KM.18, Blok4, RT04/05, Tanjung Perak",//streetAddress
                                "addressLocality":"Jimbaran",//addressLocality
                                "postalCode":"56161"//postalCode
                                }
                            }                    
        }      
} 
</script>

2 个答案:

答案 0 :(得分:2)

经过长途跋涉,最后,我找到了解决方案:

<script type="application/ld+json">{
  "@context": "http://schema.org",  
  "@type": "JobPosting",  

      "baseSalary":{
      "@type":"MonetaryAmount",
          "value":"100000",
          "currency":"USD"
          },

        "datePosted":"2017-06-18T15:14:57+00:00",
        "validThrough":"2017-12-31T00:00:00+00:00",
        "title":"Sales And Marketing Manager",
        "description":"Responsible for Corporate and Travel Agent Room Sales for the hotel",
        "educationRequirements":"S-1 Management",//educationRequirements
        "employmentType":"Kontrak 1 Tahun",//employmentType
        "experienceRequirements":"100 Tahun",//experienceRequirements
        "industry":"Perpajakan Daerah Sumedang",//industry
        "qualifications":"Single, Fresh Graduates dan suka ternak bebek",//qualifications
        "responsibilities":"Tukang mbersihin kadang embek",//responsibilities
        "skills":"Bisa menjahit, ngetik 40 jari",//skills
        "workHours":"Jam 10 s/d 70",//workHours
        "hiringOrganization":{
        "@type":"Organization",
            "name":"Equity Jimbaran Resort And Villa",
            "sameAs":"http://equityhoteljimbaran.com",
            "url":"http://equityhoteljimbaran.com"
            },
                    "jobLocation":{
                    "@type":"Place",
                        "address":{
                            "@type":"PostalAddress",
                                "addressRegion":"Bali",
                                "addressCountry":"ID",
                                "streetAddress":"Jl.Muara 3, KM.18, Blok4, RT04/05, Tanjung Perak",//streetAddress
                                "addressLocality":"Jimbaran",//addressLocality
                                "postalCode":"56161"//postalCode
                                }
                            }                    
        }      
} 
</script>

从上面的结构数据中,baseSalary期望MonetaryAmount的类型,其中值是工资的数量,如下所示:

      "baseSalary":{
      "@type":"MonetaryAmount",
          "value":"100000",
          },

但是,当baseSalary添加并经过验证后,Google再次在currency中向我发送了错误,我将其置于baseSalary内:

      "baseSalary":{
      "@type":"MonetaryAmount",
          "value":"100000",
          "currency":"USD"
          },

Google SDTT parses baseSalary correctly

成功完成。

答案 1 :(得分:1)

这是对上面有关微数据的@ huykon225问题的答案,因为尽管互联网上充斥着json的正确版本,但我找不到在任何地方的微数据上下文中都可以回答此问题。令我沮丧的是,花了一个小时或更长时间来整理它...

将其替换为原始代码:

<span itemprop="salaryCurrency">USD</span> <span itemprop="baseSalary">100000</span>

与此:

<div itemprop="baseSalary" itemscope="" itemtype="https://schema.org/MonetaryAmount">
<span itemprop="currency">USD</span>
<span itemprop="value">100000</span>
</div>