字符串到Poco / JSON或rapidjson中的JSON

问题描述 投票:-1回答:1

我想将以下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"}
c++ json poco-libraries rapidjson
1个回答
0
投票

将字符串转换为文档,然后解析

© www.soinside.com 2019 - 2024. All rights reserved.