RehanSaeed / Schema.NET

Schema.org objects turned into strongly typed C# POCO classes for use in .NET. All classes can be serialized into JSON/JSON-LD and XML, typically used to represent structured data in the head section of html page.
MIT License
640 stars 80 forks source link

Best way to infer the class hierarchy? #685

Open kirk-marple opened 3 months ago

kirk-marple commented 3 months ago

Describe the feature

I was curious if there's already something in Schema.NET which could look at a "@type" value, and return the class hierarchy?

Like, for AutomotiveBusiness, it would return LocalBusiness, Organization, etc.

We could brute-force this with a lookup table of some sort, but I wanted to first check if this already existed in the library somewhere.

Schema objects

No response