Forcing complete re-serialization

  • Thread starter Thread starter Ray Mitchell
  • Start date Start date
R

Ray Mitchell

It is my understanding that as objects are serialized to an output stream
the stream remembers which ones have been previously serialized and merely
writes a reference to them rather than reserializing them. How do I cause
previous objects to be fully reserialized?

Thanks,
Ray Mitchell
 
This only works for one object graph at a time, as far as I know.
In other words, let's take the Excel objec model as an example. Yes, I konw
it's not serializable, but the structure of the object graph is the
important thing.
If I could, in theory, serialize the root Application object, it would then
drive down further in the object graph, and continue to serialize the
Workbook and Worksheet objects, etc. But notice that the workbooks and
woorksheets all have references back to the Application object. If we
reserialized that completely, then the serializer would go on endless loops
serializing anything with a circular reference. That's why you see this
behaviour.

-Rob Teixeira [MVP]
 
Back
Top