Added Easy::Entity::to_object()
This commit is contained in:
parent
233646668e
commit
67da294d1d
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.7)
|
cmake_minimum_required (VERSION 3.7)
|
||||||
project (mastodon-cpp
|
project (mastodon-cpp
|
||||||
VERSION 0.7.16
|
VERSION 0.7.17
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,11 @@ const void Easy::Entity::from_string(const string &json)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Json::Value Easy::Entity::to_object() const
|
||||||
|
{
|
||||||
|
return _tree;
|
||||||
|
}
|
||||||
|
|
||||||
Easy::Entity::Entity()
|
Easy::Entity::Entity()
|
||||||
: _valid(false)
|
: _valid(false)
|
||||||
{}
|
{}
|
||||||
|
|
|
@ -131,13 +131,19 @@ public:
|
||||||
Entity();
|
Entity();
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Replaces the Entity object with a new one from a JSON
|
* @brief Replaces the Entity with a new one from a JSON string.
|
||||||
* string.
|
|
||||||
*
|
*
|
||||||
* @param json JSON string
|
* @param json JSON string
|
||||||
*/
|
*/
|
||||||
const void from_string(const string &json);
|
const void from_string(const string &json);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* @brief Returns the JSON object of the Entity
|
||||||
|
*
|
||||||
|
* @return JSON object
|
||||||
|
*/
|
||||||
|
const Json::Value to_object() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns true if the Entity holds valid data
|
* @brief Returns true if the Entity holds valid data
|
||||||
*/
|
*/
|
||||||
|
|
Reference in New Issue