我想将以下std :: string消息转换为json对象,以便我可以轻松遍历该对象并根据需要获取键/值对。
我更喜欢使用rapidjson或Poco :: JSON
std::string request;
std::cout << request << std::endl;
This is the output of request: {"USER_ID":"1","Exchange":"NASDAQ","ActionType":"BUY","OrderType":"MARKET","Quantity":"100","TimeInForce":"GTC"}
将字符串转换为文档,然后解析