mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Don't use JsonBuffer to create or parse objects and arrays.
* Added DynamicJsonArray and StaticJsonArray * Added DynamicJsonObject and StaticJsonObject * Added DynamicJsonVariant and StaticJsonVariant * Added deserializeJson() * Removed JsonBuffer::parseArray(), parseObject() and parse() * Removed JsonBuffer::createArray() and createObject()
This commit is contained in:
		| @@ -43,12 +43,9 @@ void setup() { | ||||
| } | ||||
|  | ||||
| void loop() { | ||||
|   // Allocate JsonBuffer | ||||
|   // Allocate the root JsonObject | ||||
|   // Use arduinojson.org/assistant to compute the capacity. | ||||
|   StaticJsonBuffer<500> jsonBuffer; | ||||
|  | ||||
|   // Create the root object | ||||
|   JsonObject& root = jsonBuffer.createObject(); | ||||
|   StaticJsonObject<500> root; | ||||
|  | ||||
|   // Create the "analog" array | ||||
|   JsonArray& analogValues = root.createNestedArray("analog"); | ||||
| @@ -98,4 +95,4 @@ void loop() { | ||||
| // The book "Mastering ArduinoJson" contains a tutorial on serialization. | ||||
| // It begins with a simple example, then adds more features like serializing | ||||
| // directly to a file or any stream. | ||||
| // Please check it out at: https://arduinojson.org/book/ | ||||
| // Please check it out at: https://arduinojson.org/book/ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user