I know, this already sounds like a dumb request, but I have a very reasonable use case for wanting to be able to force serialization of a field that's transient. Specifically, the Java class javax.swing.tree.DefaultMutableTreeNode (later referred to as DMTN) has it's userObject field marked as transient (but only so the Java serialization code can give it special treatment).
By default, Kryo just ignores the userObject field (a very reasonable thing to do since it's marked transient).
I was looking for a good way to serialize a DMTN including its userObject field, and the best I could come up with is to write my own serializer that just delegated to the FieldSerializer. Then after serializing my DMTN, I would also serialize the userObject. Is there a better solution to this problem?
If not, think it might make sense to implement some kind of method on FieldSerializer that would allow me to indicate that a field should be serialized regardless of its being marked transient? Kind of like the opposite of FieldSerializer.removeField(String).
Thanks!
Mark