mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Removed the overloads of add() by using a templated type
This commit is contained in:
		| @@ -16,23 +16,9 @@ public: | ||||
|     { | ||||
|         itemCount = 0; | ||||
|     } | ||||
|      | ||||
|     void add(const char* value) | ||||
|     { | ||||
|         add(JsonValue(value)); | ||||
|     } | ||||
|  | ||||
|     void add(double value) | ||||
|     { | ||||
|         add(JsonValue(value)); | ||||
|     } | ||||
|  | ||||
|     void add(bool value) | ||||
|     { | ||||
|         add(JsonValue(value)); | ||||
|     } | ||||
|  | ||||
|     void add(JsonObjectBase& value) | ||||
|     template<typename T> | ||||
|     void add(T value) | ||||
|     { | ||||
|         add(JsonValue(value)); | ||||
|     } | ||||
|   | ||||
| @@ -17,7 +17,8 @@ public: | ||||
|         itemCount = 0; | ||||
|     } | ||||
|  | ||||
|     void add(const char* key, const char* value) | ||||
|     template<typename T> | ||||
|     void add(const char* key, T value) | ||||
|     { | ||||
|         add(key, JsonValue(value)); | ||||
|     } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user