changed Event json serialization to lohmann
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user