mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Added comments
This commit is contained in:
		| @@ -13,25 +13,30 @@ namespace ArduinoJson | ||||
| { | ||||
|     namespace Parser | ||||
|     { | ||||
|         // An iterator for JsonObject | ||||
|         class JsonObjectIterator : JsonToken | ||||
|         { | ||||
|         public: | ||||
|  | ||||
|             // Create an iterator pointing at the specified token | ||||
|             JsonObjectIterator(JsonToken token) | ||||
|                 : JsonToken(token) | ||||
|             { | ||||
|             } | ||||
|  | ||||
|             // Move to the next JsonPair | ||||
|             void operator++() | ||||
|             { | ||||
|                 *this = JsonObjectIterator(nextSibling().nextSibling()); | ||||
|             } | ||||
|  | ||||
|             // Get the JsonPair pointed by the iterator | ||||
|             JsonPair operator*() const | ||||
|             { | ||||
|                 return JsonPair(*this); | ||||
|             } | ||||
|  | ||||
|             // Test iterator equality | ||||
|             bool operator!= (const JsonObjectIterator& other) const | ||||
|             { | ||||
|                 return JsonToken::operator!=(other); | ||||
|   | ||||
| @@ -11,20 +11,24 @@ namespace ArduinoJson | ||||
| { | ||||
|     namespace Parser | ||||
|     { | ||||
|         // A JSON key-value pair, as a part of a JSON object | ||||
|         class JsonPair : JsonToken | ||||
|         { | ||||
|         public: | ||||
|             // Convert a JsonToken to a JsonPair | ||||
|             JsonPair(JsonToken token) | ||||
|                 : JsonToken(token) | ||||
|             { | ||||
|  | ||||
|             } | ||||
|  | ||||
|             // Get the key | ||||
|             const char* key() | ||||
|             { | ||||
|                 return getText(); | ||||
|             } | ||||
|  | ||||
|             // Get the value | ||||
|             JsonValue value() | ||||
|             { | ||||
|                 return nextSibling(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user