mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-17 20:42:24 +02:00
Fixed failing test
This commit is contained in:
@ -33,4 +33,21 @@ size_t JsonObjectBase::printTo(Print& p) const
|
||||
n += p.write('}');
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
JsonObjectBase::KeyValuePair* JsonObjectBase::getMatchingPair(char const* key)
|
||||
{
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
if (items[i].key.equals(key))
|
||||
{
|
||||
return &items[i];
|
||||
}
|
||||
}
|
||||
|
||||
if (count >= capacity) return 0;
|
||||
|
||||
KeyValuePair* p = &items[count++];
|
||||
p->key.set(key);
|
||||
return p;
|
||||
}
|
Reference in New Issue
Block a user