Persist an object that is not marked as serializable
- by lasseeskildsen
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.