I have a class (let us call it a Piece
) containing a member of type com.jme3.math.ColorRGBA
. With a default Jackson serialization the member is serialized not only as its members r
, g
, b
and a
, but then also using getters like getAlpha
.
As this is obviously redundant, I would like to control the serialization and to serialize only those primary members. Are there some annotations that I can write to my class to control serialization of members with types not under my control, or some custom serializers for them?
I can probably write a custom serializer for the Piece
class, though other than ColorRGBA
serializer being too verbose, default serialization works fine for me for all other properties of Piece
, therefore I would like to customize as little of it as possible.
I do not want to modify jme3
library source, the solution should be implemented outside of the ColorRGBA
class.