RuedigerMoeller / fast-serialization

FST: fast java serialization drop in-replacement
Apache License 2.0
1.58k stars 248 forks source link

Is it possible to use FST to customise the default serialization of a java object #331

Open ghoshtir opened 1 year ago

ghoshtir commented 1 year ago

I was wondering if for a java object I can override the readObject/writeObject to use FST or to implement Externalizable and override the readExternal/writeExtenal to use FST.

I am using a framework where I dont have much handle on the serialization/deserialization unless I play around with the above methods of the java objects. Thats why wanted to know if I can still use FST or not.

richard-smith-preservica commented 1 year ago

You can use Externalizable.

You can also use custom serialisation overrides but only with some configurations (in particular it didn't work for me using the JSON configuration and I had to switch to using Externalizable instead).