Contributor
Fares Atef

Better (de)serialization support for objects


Mentors
Josh Ventura, fundies
Organization
The ENIGMA Team
Technologies
json, c++
Topics
game engine, Serialization, Deserialization, Template Metaprogramming
The ENIGMA project uses a hierarchy of objects to represent entities. These objects are serialized and deserialized using (de)serialization routines implemented for them. However, the current implementation is not very clean as it checks the type of each argument against an if-else ladder, making it difficult to read and extend. This project aims to make the serialization framework easier to use and extend by changing the way the serialize, serialize_into and deserialize functions work to dispatch to supported types implicitly without the need for an if-else ladder. And the project also aims to implement support for additional data types like generic routines for map, vector and complex numbers. This would enable more easily serializing ENIGMA's internal state for use in sending state either across a network or into a file. Additionally, the project aims to introduce support for the JSON format within the serialization system, offering it as a new option alongside the existing bytes format. This addition enhances the readability and debugging capability of the serialized data.