This project demonstrates an automatic conversion system between C++ structures and JSON using Boost.JSON and Boost.Describe.
By defining the "field sequence" only once, it can automatically generate both the struct definition and BOOST_DESCRIBE_STRUCT declarations, reducing redundancy and improving maintainability.
- 
Automatic Struct Description 
 UsesAutoDescribe.hppto generate struct definitions andBOOST_DESCRIBE_STRUCTat the same time.
- 
JSON Serialization / Deserialization 
 JsonCodec.hppprovides easy-to-use functions to convert described structs to and from JSON using Boost.JSON.
- 
Pretty Printing 
 Built-in pretty printer for better readability.
- 
File I/O 
 Save and load JSON data directly to and from files.
- 
Clang-based Code Generation 
 Python tools (gen_fields.py,gen_all_structs.py) use libclang to scan headers and generateBOOST_DESCRIBE_STRUCTautomatically.
- Boost >= 1.75 (Tested with Boost 1.88)
- See INSTALL.md for more information
 
- Python 3 with clangbindings
- libclang (LLVM)
cmake -B build -S .   -DCMAKE_BUILD_TYPE=Release   -DLIBCLANG_DLL=/path/to/libclang.dll
cmake --build buildhello::world::User user{"John Doe", 30, true, {"john@example.com", 95.5}, {}};
std::string json_str = JsonCodec::toString(user, true);
std::cout << json_str << std::endl;
hello::world::User loaded = JsonCodec::fromString<hello::world::User>(json_str);This project is licensed under the MIT License. See LICENSE for details.