I use Kotlon class enums with Spring/Hibernate and 99.9% of the time they do what I want when these values are serialized into a JSON. The 0.1% case is what I’m dealing with now, I need a leading number character, which Kotlin (like all languages I know of) doesn’t allow in an enum.
The “name” property is final and can’t be overriden. Is there some other way to set what the name string is? I can override toString() fine but apparently that’s not what the JSON serializer is using.