Type.__init__ or __post_init__


Maybe the Type.__init__ could call an __post_init__(self) at the end so subclasses that want to further validate can define it easing validation and avoid forgetting to super().__init__(*args, **kwargs).

Python 3.7 dataclass do it. I also don’t understand the advantages of having the root of the validation tree an Type instead of Object. Could every object be like Type and a new JSON be like the current Object.

In fact I’m having a hard time trying to understand why no to do like PyDantic or a dataclasses augmented with serialization, or even use then directly. Can you talk about this?