Persist an object that is not marked as serializable
Posted
by lasseeskildsen
on Stack Overflow
See other posts from Stack Overflow
or by lasseeskildsen
Published on 2010-04-07T20:28:28Z
Indexed on
2010/04/07
20:33 UTC
Read the original article
Hit count: 458
Hi,
I need to persist an object that is not marked with the serializable attribute. The object is from a 3rd party library which I cannot change.
I need to store it in a persist place, like for example the file system, so the optimal solution would be to serialize the object to a file, but since it isn't marked as serializable, that is not a straight forward solution.
It's a pretty complex object, which also holds a collection of other objects.
Do you guys have any input on how to solve this? The code will never run in a production environment, so I'm ok with almost any solution and performance.
© Stack Overflow or respective owner