mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 13:02:25 +02:00
24 lines
426 B
C++
24 lines
426 B
C++
/*
|
|
* Arduino JSON library
|
|
* Benoit Blanchon 2014 - MIT License
|
|
*/
|
|
|
|
#include "JsonObjectBase.h"
|
|
|
|
using namespace ArduinoJson::Parser;
|
|
|
|
int JsonObjectBase::getNestedTokenCount(jsmntok_t* token)
|
|
{
|
|
int tokensToVisit = token->size;
|
|
int count = 0;
|
|
|
|
while (tokensToVisit)
|
|
{
|
|
count++;
|
|
token++;
|
|
tokensToVisit--;
|
|
tokensToVisit += token->size;
|
|
}
|
|
|
|
return count;
|
|
} |