Version Tolerant Serialization in C++
Version-tolerant serialization in C++ is simplified with a binary serialization framework. It allows easy serialization of complex structures like A and B, supporting field renaming and handling added/deleted fields efficiently. Limited to C++ with no cross-language/platform support.
Read original articleThis article discusses version-tolerant serialization in C++. It introduces a binary serialization framework that simplifies the serialization of data structures. By using macros and defining readers and writers, developers can easily serialize and deserialize complex structures like A and B. The framework allows for version-tolerant serialization, enabling reading of updated structures from previously serialized data. It also supports renaming fields and handling added or deleted fields with minimal adjustments. The serialization technique is highlighted for its simplicity, low overhead, and performance comparable to std::memmove. However, it is noted that the framework is limited to C++ and does not support cross-language or cross-platform serialization. Additionally, it can only serialize a tree of objects, not graphs, due to the lack of object reference comparison mechanisms. The framework is part of the AWL Library on GitHub, offering developers the opportunity to explore and test its capabilities.
Related
Binrw
The tool binrw simplifies binary parsing and serialization with a declarative approach, offering readability and maintainability. It supports common tasks, generics, custom parsers, predefined types, and is safe for various environments.
Optimizing the Roc parser/compiler with data-oriented design
The blog post explores optimizing a parser/compiler with data-oriented design (DoD), comparing Array of Structs and Struct of Arrays for improved performance through memory efficiency and cache utilization. Restructuring data in the Roc compiler showcases enhanced efficiency and performance gains.
The Byte Order Fiasco
Handling endianness in C/C++ programming poses challenges, emphasizing correct integer deserialization to prevent undefined behavior. Adherence to the C standard is crucial to avoid unexpected compiler optimizations. Code examples demonstrate proper deserialization techniques using masking and shifting for system compatibility. Mastery of these concepts is vital for robust C code, despite available APIs for byte swapping.
A Type for Overload Set
The article explores C++ overload set challenges, discussing issues with standard functions encountering problems due to overloading. It introduces proposal P3312 for a unique type to address these limitations, emphasizing the need for a more efficient solution.
Compile-time JSON deserialization in C++
This article explores compile-time JSON deserialization in C++. It discusses static reflection, pattern matching, template specialization, and constexpr functions to parse JSON data into atomic and compound types, ensuring type safety and flexibility.
Related
Binrw
The tool binrw simplifies binary parsing and serialization with a declarative approach, offering readability and maintainability. It supports common tasks, generics, custom parsers, predefined types, and is safe for various environments.
Optimizing the Roc parser/compiler with data-oriented design
The blog post explores optimizing a parser/compiler with data-oriented design (DoD), comparing Array of Structs and Struct of Arrays for improved performance through memory efficiency and cache utilization. Restructuring data in the Roc compiler showcases enhanced efficiency and performance gains.
The Byte Order Fiasco
Handling endianness in C/C++ programming poses challenges, emphasizing correct integer deserialization to prevent undefined behavior. Adherence to the C standard is crucial to avoid unexpected compiler optimizations. Code examples demonstrate proper deserialization techniques using masking and shifting for system compatibility. Mastery of these concepts is vital for robust C code, despite available APIs for byte swapping.
A Type for Overload Set
The article explores C++ overload set challenges, discussing issues with standard functions encountering problems due to overloading. It introduces proposal P3312 for a unique type to address these limitations, emphasizing the need for a more efficient solution.
Compile-time JSON deserialization in C++
This article explores compile-time JSON deserialization in C++. It discusses static reflection, pattern matching, template specialization, and constexpr functions to parse JSON data into atomic and compound types, ensuring type safety and flexibility.