mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 04:52:22 +02:00
21 lines
341 B
C++
21 lines
341 B
C++
|
|
#include "JsonToken.h"
|
|
|
|
using namespace ArduinoJson::Internal;
|
|
|
|
int JsonToken::nestedTokenCount() const
|
|
{
|
|
jsmntok_t* t = token;
|
|
int yetToVisit = t->size;
|
|
int count = 0;
|
|
|
|
while (yetToVisit)
|
|
{
|
|
count++;
|
|
t++;
|
|
yetToVisit--;
|
|
yetToVisit += t->size;
|
|
}
|
|
|
|
return count;
|
|
} |