diff --git a/src/easy/easy.hpp b/src/easy/easy.hpp index 58cc899..f314f80 100644 --- a/src/easy/easy.hpp +++ b/src/easy/easy.hpp @@ -356,6 +356,11 @@ public: */ virtual ~Entity(); + /*! + * Returns the JSON object of the Entity + * + * @since 0.100.0 + */ operator const Json::Value() const; /*! diff --git a/src/easy/entity.cpp b/src/easy/entity.cpp index df51565..ae2ca4a 100644 --- a/src/easy/entity.cpp +++ b/src/easy/entity.cpp @@ -39,7 +39,8 @@ Easy::Entity::Entity(const Json::Value &object) {} Easy::Entity::Entity() -: _was_set(false) +: _tree(Json::nullValue) +, _was_set(false) {} Easy::Entity::~Entity() diff --git a/src/easy/simple_calls.cpp b/src/easy/simple_calls.cpp index 4ac660b..dfce346 100644 --- a/src/easy/simple_calls.cpp +++ b/src/easy/simple_calls.cpp @@ -155,7 +155,7 @@ const return_entity_vector Easy::get_notifications(const uint16_t limit, // Transform vector of strings to vector of Notification. std::transform(answer_v.begin(), answer_v.end(), notifications.begin(), - [](const string s) + [](const string &s) { return GenericEntity(s); }); return { ret.error_code, ret.error_message, notifications };