// ArduinoJson - arduinojson.org // Copyright Benoit Blanchon 2014-2018 // MIT License #pragma once #include "JsonArray.hpp" #include "JsonObject.hpp" namespace ArduinoJson { template inline JsonArray JsonObject::createNestedArray(const TString& key) { return createNestedArray_impl(key); } template inline JsonArray JsonObject::createNestedArray(TString* key) { return createNestedArray_impl(key); } template inline JsonArray JsonObject::createNestedArray_impl(TStringRef key) { if (!_data) return JsonArray(); JsonArray array(_memoryPool); if (!array.isNull()) set(key, array); return array; } template inline JsonObject JsonObject::createNestedObject_impl(TStringRef key) { if (!_data) return JsonObject(); JsonObject object(_memoryPool); if (!object.isNull()) set(key, object); return object; } } // namespace ArduinoJson