mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 16:14:11 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			26 lines
		
	
	
		
			499 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			26 lines
		
	
	
		
			499 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include "JsonBuffer.h"
 | |
| 
 | |
| #include <new>
 | |
| 
 | |
| #include "JsonValue.h"
 | |
| #include "Internals/JsonParser.h"
 | |
| #include "Internals/JsonNode.h"
 | |
| 
 | |
| JsonValue JsonBuffer::createValue()
 | |
| {
 | |
|     return JsonValue(createNode());
 | |
| }
 | |
| 
 | |
| JsonNode* JsonBuffer::createNode()
 | |
| {
 | |
|     void* node = allocateNode();
 | |
|     if (!node) return 0;
 | |
|         
 | |
|     return new (node) JsonNode();
 | |
| }
 | |
| 
 | |
| JsonArray JsonBuffer::parseArray(char* json)
 | |
| {
 | |
|     JsonParser parser(this, json);
 | |
|     return JsonArray(parser.parseNode());
 | |
| } |