mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			338 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			338 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * malloc-free JSON parser for Arduino
 | |
|  * Benoit Blanchon 2014
 | |
|  * MIT License
 | |
|  */
 | |
| 
 | |
| #include "JsonObjectBase.h"
 | |
| 
 | |
| int JsonObjectBase::getNestedTokenCount(int tokenIndex)
 | |
| {
 | |
| 	int count = 0;
 | |
| 
 | |
| 	for (int i = 0; i < tokens[tokenIndex].size; i++)
 | |
| 	{
 | |
| 		count += 1 + getNestedTokenCount(tokenIndex + 1 + i);
 | |
| 	}
 | |
| 
 | |
| 	return count;
 | |
| } |