1
#include "MapCppPrint.hh"
3
bool MapCppPrint::birth(std::string argJsonConfigDocument) {
4
_classname = "MapCppPrint";
8
bool MapCppPrint::death() {
12
std::string MapCppPrint::process(std::string document) {
13
Json::Value root; // will contains the root value after parsing.
15
bool parsingSuccessful = reader.parse(document, root);
16
if (!parsingSuccessful) {
20
ss << _classname << " says:" << reader.getFormatedErrorMessages();
21
errors["bad_json_document"] = ss.str();
22
root["errors"] = errors;
24
Json::FastWriter writer;
25
return writer.write(root);
27
std::cout << "MapCppPrint output" << std::endl;