Reputation: 11
I'm a little confused about the new JobPosting listing on schema.org, specifically the baseSalary property's expected type.
The docs say that Number is one of the three expected types:
But when I test the page on Google structured data testing tool I get this warning:
stating that 'Number is not a known valid target type for the baseSalary property.'
Nothing weird in the code, just a simple span with the baseSalary itemprop:
<span itemprop="baseSalary">36000</span>
Am I misunderstanding this or missing something?
Cheers
Upvotes: 1
Views: 552
Reputation: 569
In case someone wants to use HTML elements for the baseSalary
instead of ld+json
schema:
<span itemprop="baseSalary" itemtype="https://schema.org/MonetaryAmount" itemscope>
<span itemprop="value" itemtype="https://schema.org/QuantitativeValue" itemscope>
<span itemprop="value">30</span>
<span itemprop="unitText">HOUR</span>
</span>
<span itemtype="https://schema.org/salaryCurrency" itemprop="currency">USD</span>
</span>
Upvotes: 0
Reputation: 7781
This is not schema.org error. This issue related specifically to google validator & rich snippets recommended properties/guidelines (I agree that an error message does not contribute too much information).
For rich results - Google Required MonetaryAmount
as a type for baseSalary (Not number)
"baseSalary": {
"@type": "MonetaryAmount",
"currency": "USD",
"value": {
"@type": "QuantitativeValue",
"value": 40.00,
"unitText": "HOUR"
}
}
Docs & examples:
https://developers.google.com/search/docs/data-types/job-posting
Upvotes: 2