A C++17 static reflection framework for parsing configuration files (XML, JSON, YAML) into native data structures.
config-loader is a C++17 static reflection framework that automatically parses configuration files (XML, JSON, YAML) into native C++ data structures. It solves the problem of writing repetitive, error-prone parsing code by using meta-programming to generate serialization interfaces from schema definitions.
C++ developers building applications that require flexible, type-safe configuration management, such as game engines, server software, or tools with complex settings.
Developers choose config-loader for its simplicity, lightweight design, and support for multiple configuration formats without boilerplate. Its compile-time reflection ensures type safety and performance, while the extensible architecture allows easy integration into existing projects.
Simple C++ Config Loader Framework(Serialization & Reflection)
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses C++17 static reflection with the DEFINE_SCHEMA macro to automatically generate parsing code, ensuring configurations map correctly to data structures without runtime type errors.
Supports XML, JSON, and YAML through dedicated load interfaces like loadXML2Obj and loadJSON2Obj, allowing developers to switch formats without rewriting parsing logic.
Eliminates repetitive parsing code by defining schemas once; the framework handles serialization, reducing manual effort and potential bugs.
Follows the open/closed principle, enabling new data types to be added without modifying the core framework, as highlighted in the design philosophy.
Relies on tinyxml2, jsoncpp, and yamlcpp, which can increase project complexity and binary size, though future CMake options may allow selective inclusion.
Configuration files must adhere to standardized formats, such as specific tag names in XML, which may not align with all existing or custom configuration structures.
Schema definitions are fixed at compile time using macros, preventing dynamic adjustments to configuration structures without recompilation.