Parsing JSON string with jsoncpp

前端 未结 2 1750
有刺的猬
有刺的猬 2020-12-11 04:16

I\'m trying to parse a JSON string encoded with PHP and sent over TCP to a C++ client.

My JSON strings are like this:

{\"1\":{\"name\":\"MIKE\",\"sur         


        
2条回答
  •  情书的邮戳
    2020-12-11 05:13

    You can also read from a stringstream:

    std::stringstream sstr(stringJson);
    Json::Value json;
    sstr >> json;
    

提交回复
热议问题