mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Changed return type of convertToJson() and Converter::toJson() to void
This commit is contained in:
		| @@ -13,11 +13,10 @@ struct Date { | ||||
|   int year; | ||||
| }; | ||||
|  | ||||
| bool convertToJson(const Date& src, JsonVariant dst) { | ||||
| void convertToJson(const Date& src, JsonVariant dst) { | ||||
|   dst["day"] = src.day; | ||||
|   dst["month"] = src.month; | ||||
|   dst["year"] = src.year; | ||||
|   return true; | ||||
| } | ||||
|  | ||||
| void convertFromJson(JsonVariantConst src, Date& dst) { | ||||
| @@ -92,10 +91,9 @@ class Complex { | ||||
| namespace ARDUINOJSON_NAMESPACE { | ||||
| template <> | ||||
| struct Converter<Complex> { | ||||
|   static bool toJson(const Complex& src, VariantRef dst) { | ||||
|   static void toJson(const Complex& src, VariantRef dst) { | ||||
|     dst["real"] = src.real(); | ||||
|     dst["imag"] = src.imag(); | ||||
|     return true; | ||||
|   } | ||||
|  | ||||
|   static Complex fromJson(VariantConstRef src) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user