1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #include <anna/json/functions.hpp>
10 #include <anna/json/SaxConsumer.hpp>
13 std::string anna::json::functions::json2xml(const std::string &json, bool & success) {
15 // create a SAX event consumer object
16 anna::json::SaxConsumer consumer;
18 // parse and serialize JSON
19 success = nlohmann::json::sax_parse(json, &consumer);
21 // output the result of sax_parse
22 return consumer.getResult().str();