Home » U++ Library support » U++ Core » About Serialization
About Serialization [message #50455] |
Thu, 01 November 2018 11:41 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
Hi Mirek,
A quick question here: Is Serialization guaranteed to retain binary compatibility over the years to come and across platforms? I.e. is it safe to store data in files created by Serialize() so that they can be read from those same files in the coming years with programs created with future versions of U++?
Best regards,
Tom
|
|
|
Re: About Serialization [message #50457 is a reply to message #50455] |
Fri, 02 November 2018 09:08 |
|
mirek
Messages: 13975 Registered: November 2005
|
Ultimate Member |
|
|
Tom1 wrote on Thu, 01 November 2018 11:41Hi Mirek,
A quick question here: Is Serialization guaranteed to retain binary compatibility over the years to come and across platforms? I.e. is it safe to store data in files created by Serialize() so that they can be read from those same files in the coming years with programs created with future versions of U++?
Best regards,
Tom
Well, this one is interesting... Originally, it was not meant to be (like 15 years ago...), but now it definitely is. As long as you play right with Serialize (e.g. carefully version for the future), it is compatible across platforms and future proof.
Mirek
[Updated on: Fri, 02 November 2018 09:08] Report message to a moderator
|
|
|
|
|
Re: About Serialization [message #50767 is a reply to message #50460] |
Fri, 14 December 2018 11:34 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
Hi Mirek,
I would like to serialize 'Vector<Any> vec;', but Any does not have Serialize() available. How to proceed to accomplish this?
Best regards,
Tom
|
|
|
|
Re: About Serialization [message #50769 is a reply to message #50768] |
Fri, 14 December 2018 13:53 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
Hi,
This is exactly what I just did as a workaround while waiting for your input on the subject. (I thought there might be a nicer way.) Anyway, it works just fine!
Thanks and best regards,
Tom
|
|
|
|
Re: About Serialization [message #50771 is a reply to message #50770] |
Fri, 14 December 2018 14:04 |
Tom1
Messages: 1212 Registered: March 2007
|
Senior Contributor |
|
|
That sounds interesting.. I need to dig a little deeper with that idea!
While Any has worked great for my mixed set of classes, it is a bit complex to code with those Is<>() / Get<>() interfaces. Value with my own classes might be a nicer way to deal with this.
Thanks,
Tom
|
|
|
Goto Forum:
Current Time: Mon Apr 29 17:20:09 CEST 2024
Total time taken to generate the page: 0.01835 seconds
|