Is it possible to serialize a static inner enum? (SOLVED)

I’m getting a “no-argument constructor not found” exception on an attempt to serialize a static inner enum, even though it does have a no-argument constructor. What’s the real reason it’s causing an exception? Bug? Something different about the implemetation of static inner enums versus normal enums or static inner classes?

SOLUTION:
So, the problem was that I had accidentally registered the inner enum to a non-enum serializer before registering it to the proper serializer (EnumSerializer).

Your serializer registration code looks fine from here… though I admit I’m squinting pretty hard.

3 Likes
Serializer.registerClass(Ability.Category.class, new EnumSerializer());

I’ve also tried:

Serializer.registerClass(Ability.Category.class);

I think you’re suggesting that perhaps I’ve already registered it to the wrong serializer or something, which seems possible, so I’ll look for that.

Thanks! That turned out to be the problem. I had put in an exception for Enums, but was accidentally checking against the serializer instead of the class.