From b4cf0a2e71ad2c204925b33f9600dc720e25b827 Mon Sep 17 00:00:00 2001 From: Joel Grunbaum <joelgrun@gmail.com> Date: Sun, 09 Jan 2022 23:22:58 +0000 Subject: [PATCH] Initial shift to rapidjson --- protocol.cpp | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/protocol.cpp b/protocol.cpp index a129985..604c725 100644 --- a/protocol.cpp +++ b/protocol.cpp @@ -37,7 +37,7 @@ // auto res = cli.Get("/recover"); std::string l; l = ss.str(); - std::queue<json::Message*> a(json::parseMany(l)); + std::queue<json::Message*> a(json::parse(l)); while (!a.empty()) { protocol::handleMessage(bs, a.front()); delete a.front(); @@ -166,7 +166,8 @@ json::Message* send(std::string& message) { auto res = cli.Post("/execution", message, "text/plain"); - return json::parseSingle(res->body); + std::queue<json::Message*> a = json::parse(res->body); + return a.front(); } } // namespace protocol -- Gitblit v1.9.3