From 13815cc714eb286f7c7f30862a661ff61659173b Mon Sep 17 00:00:00 2001 From: Johannes Wendel Date: Mon, 6 May 2019 21:49:30 +0200 Subject: [PATCH] changed Event json serialization to lohmann --- FlippR-Driver/src/input/Event.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/FlippR-Driver/src/input/Event.cpp b/FlippR-Driver/src/input/Event.cpp index 755e00e..a68be06 100644 --- a/FlippR-Driver/src/input/Event.cpp +++ b/FlippR-Driver/src/input/Event.cpp @@ -6,7 +6,7 @@ */ #include "input/Event.h" -#include +#include "json/json.hpp" #include "utility/config.h" @@ -23,13 +23,13 @@ Event::Event(uint8_t address, int priority, std::string name) : std::string Event::getJsonString() { - Poco::JSON::Object json; - json.set("name", this->name); - json.set("address", this->address); - json.set("priority", this->priority); + nlohmann::json json; + + json["name"] = this->name; + json["address"] = this->address; + json["priority"] = this->priority; - std::stringstream stringstream; - json.stringify(stringstream); + json.dump(); } bool operator==(const Event& left, const Event& right)