Re:Ask HN: Do you use JSON Schema? Help us shape its future ...
by michaelmior on Tuesday January 31, 2023 @07:51AM
(#34594442)
This doesn't deal with what type of object you create on deserialization, but you can have some form of inheritance in JSON Schema. You create a definition for the parent class and then reference that definition in the subclass and add whatever other attributes you need. JSON Schema doesn't have any understanding of classes, but this will allow you to do something similar.
[ Parent
| on HN ]
There are no comments on this comment yet.