|
|
@@ -13,25 +13,30 @@ namespace ArduinoJson
|
|
|
{
|
|
|
namespace Parser
|
|
|
{
|
|
|
+ // An iterator for JsonObject
|
|
|
class JsonObjectIterator : JsonToken
|
|
|
{
|
|
|
public:
|
|
|
|
|
|
+ // Create an iterator pointing at the specified token
|
|
|
JsonObjectIterator(JsonToken token)
|
|
|
: JsonToken(token)
|
|
|
{
|
|
|
}
|
|
|
|
|
|
+ // Move to the next JsonPair
|
|
|
void operator++()
|
|
|
{
|
|
|
*this = JsonObjectIterator(nextSibling().nextSibling());
|
|
|
}
|
|
|
|
|
|
+ // Get the JsonPair pointed by the iterator
|
|
|
JsonPair operator*() const
|
|
|
{
|
|
|
return JsonPair(*this);
|
|
|
}
|
|
|
|
|
|
+ // Test iterator equality
|
|
|
bool operator!= (const JsonObjectIterator& other) const
|
|
|
{
|
|
|
return JsonToken::operator!=(other);
|