Open Toromyx opened 7 months ago
I opened a discussion: https://github.com/schemaorg/schemaorg/discussions/3411
https://github.com/schemaorg/schemaorg/discussions/3411#discussioncomment-7683350
By current schema.org semantics, the typing of the objects in the ItemList can be anything like an old school Java List. But in practice, they are going to be the things in the range of the property they are used in [...].
This suggests to me that the types of this library need to be re-thought. The choice of using serde also doesn't seem ideal, maybe built-in https://github.com/timothee-haudebourg/json-ld support makes more sense.
For now I found a workaround but I might revisit this later or if someone else actually wants to use this library :)
During deserialization of a https://schema.org/Recipe it came to my attention that https://schema.org/recipeInstructions can apparently be "an ordered list with HowToStep and/or HowToSection items", but that fact is nowhere to be seen in the structured data.
One of these things must be true:
HowToStep
andHowToSection
as possible types forrecipeInstructions
. (possible)ItemList
andListItem
are actually generic types. (i fear for the worst)