#include
#include "rapidjson/document.h" // rapidjson's DOM-style API
#include "rapidjson/prettywriter.h" // for stringify JSON
#include "rapidjson/writer.h"
#include "rapidjson/stringbuffer.h"
int main() {
std::string info="{\"hello\":\"world!\",\"param\":{\"id\":100}}";
rapidjson::Document root;
root.Parse(info.c_str());
std::string val="bac";
rapidjson::Value k;
k.SetString(val.c_str(), val.size());
rapidjson::Value params;
params=root["param"];
// 先读取嵌套对象param
std::string result1;
{
rapidjson::StringBuffer buffer1;
rapidjson::Writer<:stringbuffer> writer1(buffer1);
params.Accept(writer1);
result1 = buffer1.GetString();
//std::cout<