Open riccardolardi opened 7 years ago
Hi
I am also in search of JSON to XML parse example, in StackOverflow they mentioned we can use this library to do so, (i mean JSON->XML). several level datatype(signed, unsligned, double ect..) identifications and work around needed in the parsing process. so its clear that c++ can't handle such process.
kindly if you have any inputs on this it would save my work.
TIA
I'll pick up this thread when I get to the office. (It's the desk right next to this one. A two-meter commute!) I can provide guidance, but I can't provide code directly due to IP restrictions.
You'll need https://github.com/open-source-parsers/jsoncpp. This library and JsonCpp get along well.
Okay, it goes a little something like this. Anything I don't detail explicitly I leave as an exercise in reading the JsonCpp documentation, but none of this is difficult. Writing it recursively removes most of the complexity.
std::string json2xml(Json::Value &val)
.
Could this also be used to parse JSON into XML?