You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It works fine when the price is lower case and Assert.IsTrue passes. However when price starts with a captial P, the Assert.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/
dermotblairca
changed the title
If a json property starts with a capital, it is not deserialized
If a json property starts with a capital letter, it is not deserialized
Dec 21, 2022
dermotblairca
changed the title
If a json property starts with a capital letter, it is not deserialized
If a json property starts with a capital letter, it is not included in the deserialized object
Dec 21, 2022
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.
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
The text was updated successfully, but these errors were encountered: