Serialization disaster

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a class that once used the [Serializable()] attribute for simple
serialization. I decided that I wanted to take control of how the
serialization happens by implimenting ISerializable. I backed up my
serialized file and was hoping to deserialize the old way and serialize the
new way in order to convert my files to the new serialization. It didn't
work, and I wasn't terribly surprised. However, I converted my class exactly
back to the way it was to the old default serialization(it's a very simple
class) and it still won't deserialize! My files are now permanently corrupt
it seems, which I really took pains to avoid. Is there some way I can
reconstruct a saved object graph so I can figure out what the descrepancy
might be?
The class has one member, and ArrayList, to deserialize. How did I destroy
deserialization by changing a class and then changing it back?
 
Hi RichM,

Have you by any chance change name of a class or fields. This will
definitely break deserialization. Make sure also that you have set all your
Serializable/NonSerialize attribute set as they were.
 
Back
Top