Closed ismaelbonato closed 3 months ago
The names in your struct configuration
(interface
and devList
) do not match the keys in your JSON (Interface
and Devices
.) It works if they are changed to match: https://godbolt.org/z/7ffh4zWKh
Also, you don't need these includes
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
The names in your struct
configuration
(interface
anddevList
) do not match the keys in your JSON (Interface
andDevices
.) It works if they are changed to match: https://godbolt.org/z/7ffh4zWKhAlso, you don't need these includes
#include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp>
Thank you very much, sorry for not paying attention to this silly error, you helped me a lot.
Hello,
I`m trying to deserialize a json file in a structure, it compiles but when a run the code bellow I get the follow error.
error or GCC 11.4
Error on GCC 12.3
Thanks for any help.
Boost_VERSION is 1.85.0
CMake VERSION is 3.27
g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0 & 12.3.0
Steps necessary to reproduce the problem
my json file:
the code