Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Support arbitrary primitive types and enums as discriminators #355
For Jackson, we assume that polymorphic POJO discriminators are of type string, which is of course a bit limiting. Ideally they can be any type, including enums.
Unfortunately, it's not possible for us to support any arbitrary type with how we handle discriminators right now, but we can at least explicitly support all primitive types, as well as enums.
Stuff I'm not happy about:
This already works out of the box with Circe (sorta; I think number types might get mis-JSONed as strings) because of differences in how poloymorphism are handled, as well as the fact that Scala has typeclasses, so as long as you have an
Contributing to Twilio