title: Persist an object that is not marked as serializable
body: <p>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.</p>
  
  <p>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. </p>
  
  <p>It's a pretty complex object, which also holds a collection of other objects.</p>
  
  <p>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.</p>