mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	Return JsonArray and JsonObject by value (closes #309)
				
					
				
			This commit is contained in:
		
							
								
								
									
										30
									
								
								CHANGELOG.md
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								CHANGELOG.md
									
									
									
									
									
								
							| @@ -1,6 +1,36 @@ | ||||
| ArduinoJson: change log | ||||
| ======================= | ||||
|  | ||||
| HEAD | ||||
| ---- | ||||
|  | ||||
| * Return `JsonArray` and `JsonObject` by value instead of reference (issue #309) | ||||
| * Replaced `success()` with `isNull()` | ||||
|  | ||||
| > ### BREAKING CHANGES | ||||
| >  | ||||
| > Old code: | ||||
| > | ||||
| > ```c++ | ||||
| > JsonObject& obj = doc.to<JsonObject>(); | ||||
| > JsonArray& arr = obj.createNestedArray("key"); | ||||
| > if (!arr.success()) { | ||||
| >   Serial.println("No enough memory"); | ||||
| >   return; | ||||
| > } | ||||
| > ``` | ||||
| >  | ||||
| > New code: | ||||
| >  | ||||
| > ```c++ | ||||
| > JsonObject obj = doc.to<JsonObject>(); | ||||
| > JsonArray arr = obj.createNestedArray("key"); | ||||
| > if (arr.isNull()) { | ||||
| >   Serial.println("No enough memory"); | ||||
| >   return; | ||||
| > } | ||||
| > ``` | ||||
|  | ||||
| v6.0.1-beta | ||||
| ----------- | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user