changed Event json serialization to lohmann

This commit is contained in:
Johannes Wendel
2019-05-06 21:49:30 +02:00
parent 2e7a60c0de
commit 13815cc714

View File

@@ -6,7 +6,7 @@
*/
#include "input/Event.h"
#include <Poco/JSON/Object.h>
#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)