ghostintheshell
New member
- Joined
- Nov 21, 2020
- Messages
- 2
- Programming Experience
- 1-3
Hello.
I want to serialize the data in game to save to disk and send over the network, also need support old version (If added new properties that were not in serialization, set the default values). Sending data over the BinaryFormatter is not secure. xml weighs a lot and how json does not support reference types (if there are multiple references to an object then after deserialization it will be different objects)
I do not want to write a serialization and deserialization method for each object because it is difficult to support. getting metadata using System.Reflection cannot guarantee the same order . Adding attributes to all properties also seems wrong. how to solve this?
I want to serialize the data in game to save to disk and send over the network, also need support old version (If added new properties that were not in serialization, set the default values). Sending data over the BinaryFormatter is not secure. xml weighs a lot and how json does not support reference types (if there are multiple references to an object then after deserialization it will be different objects)
I do not want to write a serialization and deserialization method for each object because it is difficult to support. getting metadata using System.Reflection cannot guarantee the same order . Adding attributes to all properties also seems wrong. how to solve this?