diff options
Diffstat (limited to 'include/lib/ArduinoJson/JsonBufferImpl.hpp')
-rw-r--r-- | include/lib/ArduinoJson/JsonBufferImpl.hpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/lib/ArduinoJson/JsonBufferImpl.hpp b/include/lib/ArduinoJson/JsonBufferImpl.hpp new file mode 100644 index 0000000..cdea374 --- /dev/null +++ b/include/lib/ArduinoJson/JsonBufferImpl.hpp @@ -0,0 +1,17 @@ +// ArduinoJson - arduinojson.org +// Copyright Benoit Blanchon 2014-2018 +// MIT License + +#pragma once + +#include "Deserialization/JsonParser.hpp" + +inline ArduinoJson::JsonArray &ArduinoJson::JsonBuffer::createArray() { + JsonArray *ptr = new (this) JsonArray(this); + return ptr ? *ptr : JsonArray::invalid(); +} + +inline ArduinoJson::JsonObject &ArduinoJson::JsonBuffer::createObject() { + JsonObject *ptr = new (this) JsonObject(this); + return ptr ? *ptr : JsonObject::invalid(); +} |