www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - [OT] this is why you shouldn't serialize everything

reply Kagamin <spam here.lot> writes:
https://cwiki.apache.org/confluence/display/WW/S2-052
.net can, but WCF requires explicit vetting of types for protocol.
Sep 11
parent reply Shachar Shemesh <shachar weka.io> writes:
On 11/09/17 12:56, Kagamin wrote:
 https://cwiki.apache.org/confluence/display/WW/S2-052
 .net can, but WCF requires explicit vetting of types for protocol.
I've heard it somewhere that the original .doc file format was simply a serialization of the internal Word data structure. They got a save/load for practically free. Then they bring out a new version, and guess what? You cannot change anything, because you can no longer read the old files. Then it turns out that when you serialize "everything", you also serialize the undo buffer. So you can read things that someone wrote and then erased in the document. Yeah. Serialization is fine, but should be used judicially. Shachar
Sep 13
parent reply Meta <jared771 gmail.com> writes:
On Wednesday, 13 September 2017 at 07:08:42 UTC, Shachar Shemesh 
wrote:
 On 11/09/17 12:56, Kagamin wrote:
 Then it turns out that when you serialize "everything", you 
 also serialize the undo buffer. So you can read things that 
 someone wrote and then erased in the document.
I never knew that, and I sincerely hope that none of my university professors did either.
Sep 14
next sibling parent jmh530 <john.michael.hall gmail.com> writes:
On Thursday, 14 September 2017 at 19:26:44 UTC, Meta wrote:
 On Wednesday, 13 September 2017 at 07:08:42 UTC, Shachar 
 Shemesh wrote:
 On 11/09/17 12:56, Kagamin wrote:
 Then it turns out that when you serialize "everything", you 
 also serialize the undo buffer. So you can read things that 
 someone wrote and then erased in the document.
I never knew that, and I sincerely hope that none of my university professors did either.
That's a feature though isn't it. Track changes.
Sep 14
prev sibling parent Shachar Shemesh <shachar weka.io> writes:
On 14/09/17 22:26, Meta wrote:
 On Wednesday, 13 September 2017 at 07:08:42 UTC, Shachar Shemesh wrote:
 On 11/09/17 12:56, Kagamin wrote:
 Then it turns out that when you serialize "everything", you also 
 serialize the undo buffer. So you can read things that someone wrote 
 and then erased in the document.
I never knew that, and I sincerely hope that none of my university professors did either.
It was fixed at some point, so by the time you wrote obscenities about your U. profs, they may actually have not ended up in the file. Also, it goes without saying that the docx format is not like that. Shachar
Sep 15