Closed Shravan40 closed 7 years ago
dump()
on a Json string will escape it and add quotes. I suspect you want inp.push_back(j);
in the for loop?
for(auto& j: x["name"].array_items()) {
auto val = j.string_value(); // It can be int_value(), number_value() too.
inp.push_back(j.dump());
}
Json data send to post method given below is
And it's parsing name in
vector
inp as"Alice"
,"Bob"
and"Peter"
but i want to parse it asAlice
,Bob
andPeter
.