Files
ArduinoJson/JsonParser/JsonObjectBase.cpp

24 lines
426 B
C++
Raw Normal View History

2014-07-03 13:58:08 +02:00
/*
* Arduino JSON library
* Benoit Blanchon 2014 - MIT License
*/
2014-01-11 15:05:35 +01:00
#include "JsonObjectBase.h"
2014-07-03 14:00:51 +02:00
using namespace ArduinoJson::Parser;
int JsonObjectBase::getNestedTokenCount(jsmntok_t* token)
2014-01-11 15:05:35 +01:00
{
int tokensToVisit = token->size;
int count = 0;
2014-01-11 15:05:35 +01:00
while (tokensToVisit)
{
count++;
token++;
tokensToVisit--;
tokensToVisit += token->size;
}
2014-01-11 15:05:35 +01:00
return count;
2014-01-11 15:05:35 +01:00
}