mirror of
https://github.com/bblanchon/ArduinoJson.git
synced 2025-07-18 13:02:25 +02:00
Epic refactoring in progress...
This commit is contained in:
@ -17,21 +17,16 @@
|
||||
using namespace ArduinoJson;
|
||||
using namespace ArduinoJson::Internals;
|
||||
|
||||
// TODO: what happens if alloc returns NULL
|
||||
void* operator new(size_t size, ArduinoJson::JsonBuffer* buffer) {
|
||||
return buffer->alloc(size);
|
||||
}
|
||||
|
||||
JsonArray JsonBuffer::createArray() {
|
||||
return JsonArray(new (this) JsonArrayImpl(this));
|
||||
return JsonArray(JsonArrayImpl::createFrom(this));
|
||||
}
|
||||
|
||||
JsonObject JsonBuffer::createObject() {
|
||||
return JsonObject(new (this) JsonObjectImpl(this));
|
||||
return JsonObject(JsonObjectImpl::createFrom(this));
|
||||
}
|
||||
|
||||
JsonValue JsonBuffer::createValue() {
|
||||
return JsonValue(new (this) JsonValueImpl());
|
||||
return JsonValue(JsonValueImpl::createFrom(this));
|
||||
}
|
||||
|
||||
JsonArray JsonBuffer::parseArray(char* json) {
|
||||
|
Reference in New Issue
Block a user