TODO Improve error support Inherited notes: Event upcasters. Event serialization uses the event type as the root node of the JSON tree. This simplifies deserialization but is non-standard.