mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-25 02:06:04 +02:00
#3114: Added JSON Array::empty() method
This commit is contained in:
@@ -124,6 +124,9 @@ public:
|
||||
std::size_t size() const;
|
||||
/// Returns the size of the array.
|
||||
|
||||
bool empty() const;
|
||||
/// Returns true if the array is empty, false otherwise.
|
||||
|
||||
bool isArray(unsigned int index) const;
|
||||
/// Returns true when the element is an array.
|
||||
|
||||
@@ -241,6 +244,12 @@ inline std::size_t Array::size() const
|
||||
}
|
||||
|
||||
|
||||
inline bool Array::empty() const
|
||||
{
|
||||
return _values.empty();
|
||||
}
|
||||
|
||||
|
||||
inline bool Array::isArray(unsigned int index) const
|
||||
{
|
||||
Dynamic::Var value = get(index);
|
||||
|
||||
Reference in New Issue
Block a user