首页 > 解决方案 > 如何摆脱 json 消息中的 POST 详细信息?

问题描述

我收到一条包含 JSON 的 msg,但在解析 JSON 详细信息时遇到问题。我收到的味精是:

POST /api/school/2/order HTTP/1.1
User-Agent: Guzzle/4.0 curl/7.21.4 PHP/5.5.7
content-type: application/json
Content-Length: 12

{
 "json msg is here"
}

我想摆脱前 4 行 ..

有什么建议么 ?

标签: c++json

解决方案


那是因为您正在以纯文本形式检索数据。 然后,您将使用 libCURL 来获取实际的 JSON 数据。然后用一些像jsoncpp这样的C++库来解析它。


推荐阅读