Store offset between slots to reduce memory usage

This commit is contained in:
Benoit Blanchon
2018-11-30 14:26:15 +01:00
parent 8ff48dde73
commit 04e8acd844
12 changed files with 118 additions and 49 deletions

16
test/JsonArray/get.cpp Normal file
View File

@ -0,0 +1,16 @@
// ArduinoJson - arduinojson.org
// Copyright Benoit Blanchon 2014-2018
// MIT License
#include <ArduinoJson.h>
#include <catch.hpp>
TEST_CASE("JsonArray::get()") {
DynamicJsonDocument doc;
deserializeJson(doc, "[1,2,3]");
JsonArray array = doc.as<JsonArray>();
SECTION("Overflow") {
REQUIRE(array.get(3).isNull());
}
}