How to convert class object to json string using boost library in C++?
I am fairly new to C++ and I apologise beforehand if you find this very easy. I have the following files POST1.h #ifndef POST1_HH #define POST1_HH #include <iostream> #include <boost/property_tree/ptree.hpp> #include <boost/property_tree/json_parser.hpp> using namespace std ; using boost::property_tree::ptree; using boost::property_tree::read_json; using boost::property_tree::write_json; using boost::property_tree::basic_ptree; #include "DBAccess2.h" class POST1 { public: string TokenNo; string CommandStatus; string CommandID; string CPUID; string ISEncrypted; string JSON_Cmnd_String; void