You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
332 B
14 lines
332 B
9 years ago
|
#include "json_encode.h"
|
||
|
|
||
|
std::string json_encode(std::map<std::string, std::string> parameters) {
|
||
|
|
||
|
Json::Value jValues;
|
||
|
Json::StyledWriter w;
|
||
|
|
||
|
for(std::map<std::string, std::string>::iterator it = parameters.begin(); it != parameters.end(); ++it) {
|
||
|
jValues[(*it).first] = (*it).second;
|
||
|
}
|
||
|
|
||
|
return(w.write(jValues));
|
||
|
}
|