Open dermotblairca opened 1 year ago
This one I'm more on the fence about - on one hand, you're right, the validator says it is fine. On the other, should we be potentially looking at more broad case insensitive parsing? I mean, while your example is the first letter, maybe we should be every letter of a property. Do we then look at enum values too and parse them case insensitively?
Schema.org doesn't specify any case sensitivity requirements that I could find so maybe the answer is we shouldn't be case sensitive either.
@RehanSaeed - I'm curious what you think when you're available to look at this.
We should make what we accept more open and accept case insensitive JSON as you suggest. We'd happily accept a PR to that effect.
Describe the bug
For example, if the price on the offer is "Price", it will not be picked up.
Steps to reproduce
This unit test reproduces the issue:
The contents of the SchemaNetProductExample file is:
It works fine when the price is lower case and
Assert.IsTrue
passes. However when price starts with a captial P, theAssert.IsTrue
fails as both HasValue1 and HasValue2 are false on the offer.Expected behaviour
I think it should pick up the price irrelevant of the case, as the following website says it is valid schema.org: https://validator.schema.org/
Schema objects
https://schema.org/Offer