mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			43 lines
		
	
	
		
			915 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
		
			915 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Arduino JSON library
 | |
|  * Benoit Blanchon 2014 - MIT License
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include "JsonObjectBase.h"
 | |
| 
 | |
| namespace ArduinoJson
 | |
| {
 | |
|     namespace Parser
 | |
|     {
 | |
|         class JsonHashTable;
 | |
| 
 | |
|         class JsonArray : public JsonObjectBase
 | |
|         {
 | |
|             friend class JsonParserBase;
 | |
|             friend class JsonHashTable;
 | |
| 
 | |
|         public:
 | |
| 
 | |
|             JsonArray()	{}
 | |
| 
 | |
|             int getLength()
 | |
|             {
 | |
|                 return tokens != 0 ? tokens[0].size : 0;
 | |
|             }
 | |
| 
 | |
|             JsonArray getArray(int index);
 | |
|             bool getBool(int index);
 | |
|             double getDouble(int index);
 | |
|             JsonHashTable getHashTable(int index);
 | |
|             long getLong(int index);
 | |
|             char* getString(int index);
 | |
| 
 | |
|         private:
 | |
| 
 | |
|             JsonArray(char* json, jsmntok_t* tokens);
 | |
|             jsmntok_t* getToken(int index);
 | |
|         };
 | |
|     }
 | |
| } |