Implemented JsonSerializable interface for models/records
Forgot to add compat interface