1 #ifndef _JSON_PROPERTIES_H 2 #define _JSON_PROPERTIES_H 19 JSONProperty(
const std::string& column, std::vector<std::string> path,
const std::string& value) :
20 m_column(column), m_value(value)
22 for (std::vector<std::string>::const_iterator it = path.cbegin();
23 it != path.cend(); ++it)
24 m_path.push_back(*it);
27 const std::string toJSON()
const 29 std::ostringstream json;
31 json <<
"{ \"column\" : \"" << m_column <<
"\",";
32 json <<
" \"path\" : [";
33 for (std::vector<std::string>::const_iterator it = m_path.cbegin();
34 it != m_path.cend(); ++it)
36 json <<
"\"" << *it <<
"\"";
37 if ((it + 1) != m_path.cend())
41 json <<
"\"value\" : \"" << m_value <<
"\" }";
45 const std::string m_column;
46 const std::string m_value;
47 std::vector<std::string> m_path;
56 const std::string toJSON()
const 58 std::ostringstream json;
60 json <<
"\"json_properties\" : [ ";
61 for (std::vector<JSONProperty>::const_iterator it = this->cbegin();
62 it != this->cend(); ++it)
66 if (it + 1 != this->cend())
Class that defines JSON properties for update.
Definition: json_properties.h:53
Definition: json_properties.h:17