Ah I think I see why. Incase you want to encode a class as a primitive.
2 years ago
That's a corner of the serialization API that's a bit lacking in documentation. The suggested way of doing stuff is to extend AbstractEncoder/Decoder which implements both interfaces, but since most of the official encoders use the TaggedEncoder/Decoder family instead, there's not a lot of examples of how to do it right.