diff --git a/README.md b/README.md
index e451becff..45cb17c95 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,7 @@
## Sonoff-Tasmota
Provide ESP8266 based Sonoff by [iTead Studio](https://www.itead.cc/) and ElectroDragon IoT Relay with Serial, Web and MQTT control allowing 'Over the Air' or OTA firmware updates using Arduino IDE.
-Current version is **5.9.1j** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
+Current version is **5.10.0a** - See [sonoff/_releasenotes.ino](https://github.com/arendst/Sonoff-Tasmota/blob/development/sonoff/_releasenotes.ino) for change information.
### ATTENTION All versions
@@ -37,13 +37,13 @@ The following devices are supported:
- [iTead Sonoff RF](https://www.itead.cc/smart-home/sonoff-rf.html)
- [iTead Sonoff SV](https://www.itead.cc/smart-home/sonoff-sv.html)
- [iTead Sonoff TH10/TH16 with temperature sensor](https://www.itead.cc/smart-home/sonoff-th.html)
-- [iTead Sonoff Dual](https://www.itead.cc/smart-home/sonoff-dual.html)
+- [iTead Sonoff Dual (R2)](https://www.itead.cc/smart-home/sonoff-dual.html)
- [iTead Sonoff Pow](https://www.itead.cc/smart-home/sonoff-pow.html)
- [iTead Sonoff 4CH](https://www.itead.cc/smart-home/sonoff-4ch.html)
- [iTead Sonoff 4CH Pro](https://www.itead.cc/smart-home/sonoff-4ch-pro.html)
- [iTead S20 Smart Socket](https://www.itead.cc/smart-socket.html)
- [iTead Slampher](https://www.itead.cc/slampher.html)
-- [iTead Sonoff Touch](https://www.itead.cc/sonoff-touch-eu-local.html)
+- [iTead Sonoff Touch](https://www.itead.cc/sonoff-touch.html)
- [iTead Sonoff T1](https://www.itead.cc/sonoff-t1.html)
- [iTead Sonoff SC](https://www.itead.cc/sonoff-sc.html)
- [iTead Sonoff Led](https://www.itead.cc/sonoff-led.html)
@@ -55,7 +55,7 @@ The following devices are supported:
- [iTead Motor Clockwise/Anticlockwise](https://www.itead.cc/smart-home/motor-reversing-wifi-wireless-switch.html)
- [Electrodragon IoT Relay Board](http://www.electrodragon.com/product/wifi-iot-relay-board-based-esp8266/)
- [AI Light or any my9291 compatible RGBW LED](http://www.ebay.com/itm/172644855726)
-
+- MagicHome and AriLux AL-LC01 and AL-LC11
### License
diff --git a/lib-before-5.9.1f/ArduinoJson/ArduinoJson.h b/lib-before-5.9.1f/ArduinoJson/ArduinoJson.h
deleted file mode 100644
index ffea66013..000000000
--- a/lib-before-5.9.1f/ArduinoJson/ArduinoJson.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#include "include/ArduinoJson.h"
diff --git a/lib-before-5.9.1f/ArduinoJson/CHANGELOG.md b/lib-before-5.9.1f/ArduinoJson/CHANGELOG.md
deleted file mode 100644
index d92d0472b..000000000
--- a/lib-before-5.9.1f/ArduinoJson/CHANGELOG.md
+++ /dev/null
@@ -1,427 +0,0 @@
-ArduinoJson: change log
-=======================
-
-v5.8.3
-------
-
-* Fixed an access violation in `DynamicJsonBuffer` when memory allocation fails (issue #433)
-* Added operators `==` and `!=` for two `JsonVariant`s (issue #436)
-* Fixed `JsonVariant::operator[const FlashStringHelper*]` (issue #441)
-
-v5.8.2
-------
-
-* Fixed parsing of comments (issue #421)
-* Fixed ignored `Stream` timeout (issue #422)
-* Made sure we don't read more that necessary (issue #422)
-* Fixed error when the key of a `JsonObject` is a `char[]` (issue #423)
-* Reduced code size when using `const` references
-* Fixed error with string of type `unsigned char*` (issue #428)
-* Added `deprecated` attribute on `asArray()`, `asObject()` and `asString()` (issue #420)
-
-v5.8.1
-------
-
-* Fixed error when assigning a `volatile int` to a `JsonVariant` (issue #415)
-* Fixed errors with Variable Length Arrays (issue #416)
-* Fixed error when both `ARDUINOJSON_ENABLE_STD_STREAM` and `ARDUINOJSON_ENABLE_ARDUINO_STREAM` are set to `1`
-* Fixed error "Stream does not name a type" (issue #412)
-
-v5.8.0
-------
-
-* Added operator `==` to compare `JsonVariant` and strings (issue #402)
-* Added support for `Stream` (issue #300)
-* Reduced memory consumption by not duplicating spaces and comments
-
-**BREAKING CHANGES**:
-
-`JsonBuffer::parseObject()` and `JsonBuffer::parseArray()` have been pulled down to the derived classes `DynamicJsonBuffer` and `StaticJsonBufferBase`.
-
-This means that if you have code like:
-
-```c++
-void myFunction(JsonBuffer& jsonBuffer);
-```
-
-you need to replace it with one of the following:
-
-```c++
-void myFunction(DynamicJsonBuffer& jsonBuffer);
-void myFunction(StaticJsonBufferBase& jsonBuffer);
-template void myFunction(TJsonBuffer& jsonBuffer);
-```
-
-v5.7.3
-------
-
-* Added an `printTo(char[N])` and `prettyPrintTo(char[N])` (issue #292)
-* Added ability to set a nested value like this: `root["A"]["B"] = "C"` (issue #352)
-* Renamed `*.ipp` to `*Impl.hpp` because they were ignored by Arduino IDE (issue #396)
-
-v5.7.2
-------
-
-* Made PROGMEM available on more platforms (issue #381)
-* Fixed PROGMEM causing an exception on ESP8266 (issue #383)
-
-v5.7.1
-------
-
-* Added support for PROGMEM (issue #76)
-* Fixed compilation error when index is not an `int` (issue #381)
-
-v5.7.0
-------
-
-* Templatized all functions using `String` or `std::string`
-* Removed `ArduinoJson::String`
-* Removed `JsonVariant::defaultValue()`
-* Removed non-template `JsonObject::get()` and `JsonArray.get()`
-* Fixed support for `StringSumHelper` (issue #184)
-* Replaced `ARDUINOJSON_USE_ARDUINO_STRING` by `ARDUINOJSON_ENABLE_STD_STRING` and `ARDUINOJSON_ENABLE_ARDUINO_STRING` (issue #378)
-* Added example `StringExample.ino` to show where `String` can be used
-* Increased default nesting limit to 50 when compiled for a computer (issue #349)
-
-**BREAKING CHANGES**:
-
-The non-template functions `JsonObject::get()` and `JsonArray.get()` have been removed. This means that you need to explicitely tell the type you expect in return.
-
-Old code:
-
-```c++
-#define ARDUINOJSON_USE_ARDUINO_STRING 0
-JsonVariant value1 = myObject.get("myKey");
-JsonVariant value2 = myArray.get(0);
-```
-
-New code:
-
-```c++
-#define ARDUINOJSON_ENABLE_ARDUINO_STRING 0
-#define ARDUINOJSON_ENABLE_STD_STRING 1
-JsonVariant value1 = myObject.get("myKey");
-JsonVariant value2 = myArray.get(0);
-```
-
-
-v5.6.7
-------
-
-* Fixed `array[idx].as()` and `object[key].as()`
-* Fixed return value of `JsonObject::set()` (issue #350)
-* Fixed undefined behavior in `Prettyfier` and `Print` (issue #354)
-* Fixed parser that incorrectly rejected floats containing a `+` (issue #349)
-
-v5.6.6
-------
-
-* Fixed `-Wparentheses` warning introduced in v5.6.5 (PR #335 by @nuket)
-* Added `.mbedignore` for ARM mbdeb (PR #334 by @nuket)
-* Fixed `JsonVariant::success()` which didn't propagate `JsonArray::success()` nor `JsonObject::success()` (issue #342).
-
-v5.6.5
-------
-
-* `as()` now returns `true` when input is `null` (issue #330)
-
-v5.6.4
-------
-
-* Fixed error in float serialization (issue #324)
-
-v5.6.3
-------
-
-* Improved speed of float serialization (about twice faster)
-* Added `as()` as a synonym for `as()`... (issue #291)
-* Fixed `call of overloaded isinf(double&) is ambiguous` (issue #284)
-
-v5.6.2
-------
-
-* Fixed build when another lib does `#undef isnan` (issue #284)
-
-v5.6.1
-------
-
-* Added missing `#pragma once` (issue #310)
-
-v5.6.0
-------
-
-* ArduinoJson is now a header-only library (issue #199)
-
-v5.5.1
-------
-
-* Fixed compilation error with Intel Galileo (issue #299)
-
-v5.5.0
-------
-
-* Added `JsonVariant::success()` (issue #279)
-* Renamed `JsonVariant::invalid()` to `JsonVariant::defaultValue()`
-
-v5.4.0
-------
-
-* Changed `::String` to `ArduinoJson::String` (issue #275)
-* Changed `::Print` to `ArduinoJson::Print` too
-
-v5.3.0
-------
-
-* Added custom implementation of `ftoa` (issues #266, #267, #269 and #270)
-* Added `JsonVariant JsonBuffer::parse()` (issue #265)
-* Fixed `unsigned long` printed as `signed long` (issue #170)
-
-v5.2.0
-------
-
-* Added `JsonVariant::as()` as a synonym for `JsonVariant::as()` (issue #257)
-* Added example `JsonHttpClient` (issue #256)
-* Added `JsonArray::copyTo()` and `JsonArray::copyFrom()` (issue #254)
-* Added `RawJson()` to insert pregenerated JSON portions (issue #259)
-
-v5.1.1
-------
-
-* Removed `String` duplication when one replaces a value in a `JsonObject` (PR #232 by @ulion)
-
-v5.1.0
-------
-
-* Added support of `long long` (issue #171)
-* Moved all build settings to `ArduinoJson/Configuration.hpp`
-
-**BREAKING CHANGE**:
-If you defined `ARDUINOJSON_ENABLE_STD_STREAM`, you now need to define it to `1`.
-
-v5.0.8
-------
-
-* Made the library compatible with [PlatformIO](http://platformio.org/) (issue #181)
-* Fixed `JsonVariant::is()` that was incorrectly returning false (issue #214)
-
-v5.0.7
-------
-
-* Made library easier to use from a CMake project: simply `add_subdirectory(ArduinoJson/src)`
-* Changed `String` to be a `typedef` of `std::string` (issues #142 and #161)
-
-**BREAKING CHANGES**:
-- `JsonVariant(true).as()` now returns `"true"` instead of `"1"`
-- `JsonVariant(false).as()` now returns `"false"` instead of `"0"`
-
-v5.0.6
-------
-
-* Added parameter to `DynamicJsonBuffer` constructor to set initial size (issue #152)
-* Fixed warning about library category in Arduino 1.6.6 (issue #147)
-* Examples: Added a loop to wait for serial port to be ready (issue #156)
-
-v5.0.5
-------
-
-* Added overload `JsonObjectSuscript::set(value, decimals)` (issue #143)
-* Use `float` instead of `double` to reduce the size of `JsonVariant` (issue #134)
-
-v5.0.4
-------
-
-* Fixed ambiguous overload with `JsonArraySubscript` and `JsonObjectSubscript` (issue #122)
-
-v5.0.3
-------
-
-* Fixed `printTo(String)` which wrote numbers instead of strings (issue #120)
-* Fixed return type of `JsonArray::is()` and some others (issue #121)
-
-v5.0.2
-------
-
-* Fixed segmentation fault in `parseObject(String)` and `parseArray(String)`, when the
- `StaticJsonBuffer` is too small to hold a copy of the string
-* Fixed Clang warning "register specifier is deprecated" (issue #102)
-* Fixed GCC warning "declaration shadows a member" (issue #103)
-* Fixed memory alignment, which made ESP8266 crash (issue #104)
-* Fixed compilation on Visual Studio 2010 and 2012 (issue #107)
-
-v5.0.1
-------
-
-* Fixed compilation with Arduino 1.0.6 (issue #99)
-
-v5.0.0
-------
-
-* Added support of `String` class (issues #55, #56, #70, #77)
-* Added `JsonBuffer::strdup()` to make a copy of a string (issues #10, #57)
-* Implicitly call `strdup()` for `String` but not for `char*` (issues #84, #87)
-* Added support of non standard JSON input (issue #44)
-* Added support of comments in JSON input (issue #88)
-* Added implicit cast between numerical types (issues #64, #69, #93)
-* Added ability to read number values as string (issue #90)
-* Redesigned `JsonVariant` to leverage converting constructors instead of assignment operators (issue #66)
-* Switched to new the library layout (requires Arduino 1.0.6 or above)
-
-**BREAKING CHANGES**:
-- `JsonObject::add()` was renamed to `set()`
-- `JsonArray::at()` and `JsonObject::at()` were renamed to `get()`
-- Number of digits of floating point value are now set with `double_with_n_digits()`
-
-**Personal note about the `String` class**:
-Support of the `String` class has been added to the library because many people use it in their programs.
-However, you should not see this as an invitation to use the `String` class.
-The `String` class is **bad** because it uses dynamic memory allocation.
-Compared to static allocation, it compiles to a bigger, slower program, and is less predictable.
-You certainly don't want that in an embedded environment!
-
-v4.6
-----
-
-* Fixed segmentation fault in `DynamicJsonBuffer` when memory allocation fails (issue #92)
-
-v4.5
-----
-
-* Fixed buffer overflow when input contains a backslash followed by a terminator (issue #81)
-
-**Upgrading is recommended** since previous versions contain a potential security risk.
-
-Special thanks to [Giancarlo Canales Barreto](https://github.com/gcanalesb) for finding this nasty bug.
-
-v4.4
-----
-
-* Added `JsonArray::measureLength()` and `JsonObject::measureLength()` (issue #75)
-
-v4.3
-----
-
-* Added `JsonArray::removeAt()` to remove an element of an array (issue #58)
-* Fixed stack-overflow in `DynamicJsonBuffer` when parsing huge JSON files (issue #65)
-* Fixed wrong return value of `parseArray()` and `parseObject()` when allocation fails (issue #68)
-
-v4.2
-----
-
-* Switched back to old library layout (issues #39, #43 and #45)
-* Removed global new operator overload (issue #40, #45 and #46)
-* Added an example with EthernetServer
-
-v4.1
-----
-
-* Added DynamicJsonBuffer (issue #19)
-
-v4.0
-----
-
-* Unified parser and generator API (issue #23)
-* Updated library layout, now requires Arduino 1.0.6 or newer
-
-**BREAKING CHANGE**: API changed significantly, see [Migrating code to the new API](https://github.com/bblanchon/ArduinoJson/wiki/Migrating-code-to-the-new-API).
-
-
-v3.4
-----
-
-* Fixed escaped char parsing (issue #16)
-
-
-v3.3
-----
-
-* Added indented output for the JSON generator (issue #11), see example bellow.
-* Added `IndentedPrint`, a decorator for `Print` to allow indented output
-
-Example:
-
- JsonOject<2> json;
- json["key"] = "value";
- json.prettyPrintTo(Serial);
-
-v3.2
-----
-
-* Fixed a bug when adding nested object in `JsonArray` (bug introduced in v3.1).
-
-v3.1
-----
-
-* Calling `Generator::JsonObject::add()` twice with the same `key` now replaces the `value`
-* Added `Generator::JsonObject::operator[]`, see bellow the new API
-* Added `Generator::JsonObject::remove()` (issue #9)
-
-Old generator API:
-
- JsonObject<3> root;
- root.add("sensor", "gps");
- root.add("time", 1351824120);
- root.add("data", array);
-
-New generator API:
-
- JsonObject<3> root;
- root["sensor"] = "gps";
- root["time"] = 1351824120;
- root["data"] = array;
-
-v3.0
-----
-
-* New parser API, see bellow
-* Renamed `JsonHashTable` into `JsonObject`
-* Added iterators for `JsonArray` and `JsonObject` (issue #4)
-
-Old parser API:
-
- JsonHashTable root = parser.parseHashTable(json);
-
- char* sensor = root.getString("sensor");
- long time = root.getLong("time");
- double latitude = root.getArray("data").getDouble(0);
- double longitude = root.getArray("data").getDouble(1);
-
-New parser API:
-
- JsonObject root = parser.parse(json);
-
- char* sensor = root["sensor"];
- long time = root["time"];
- double latitude = root["data"][0];
- double longitude = root["data"][1];
-
-v2.1
-----
-
-* Fixed case `#include "jsmn.cpp"` which caused an error in Linux (issue #6)
-* Fixed a buffer overrun in JSON Parser (issue #5)
-
-v2.0
-----
-
-* Added JSON encoding (issue #2)
-* Renamed the library `ArduinoJsonParser` becomes `ArduinoJson`
-
-**Breaking change**: you need to add the following line at the top of your program.
-
- using namespace ArduinoJson::Parser;
-
-v1.2
-----
-
-* Fixed error in JSON parser example (issue #1)
-
-v1.1
-----
-
-* Example: changed `char* json` into `char[] json` so that the bytes are not write protected
-* Fixed parsing bug when the JSON contains multi-dimensional arrays
-
-v1.0
-----
-
-Initial release
diff --git a/lib-before-5.9.1f/ArduinoJson/CMakeLists.txt b/lib-before-5.9.1f/ArduinoJson/CMakeLists.txt
deleted file mode 100644
index 05994f4ec..000000000
--- a/lib-before-5.9.1f/ArduinoJson/CMakeLists.txt
+++ /dev/null
@@ -1,21 +0,0 @@
-# Copyright Benoit Blanchon 2014-2017
-# MIT License
-#
-# Arduino JSON library
-# https://github.com/bblanchon/ArduinoJson
-# If you like this project, please add a star!
-
-cmake_minimum_required(VERSION 3.0)
-project(ArduinoJson)
-
-enable_testing()
-
-set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
-set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
-
-if(${COVERAGE})
- set(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
-endif()
-
-add_subdirectory(test)
diff --git a/lib-before-5.9.1f/ArduinoJson/LICENSE.md b/lib-before-5.9.1f/ArduinoJson/LICENSE.md
deleted file mode 100644
index 9f35ed446..000000000
--- a/lib-before-5.9.1f/ArduinoJson/LICENSE.md
+++ /dev/null
@@ -1,10 +0,0 @@
-The MIT License (MIT)
----------------------
-
-Copyright © 2014-2017 Benoit BLANCHON
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/lib-before-5.9.1f/ArduinoJson/README.md b/lib-before-5.9.1f/ArduinoJson/README.md
deleted file mode 100644
index 25afbfa47..000000000
--- a/lib-before-5.9.1f/ArduinoJson/README.md
+++ /dev/null
@@ -1,143 +0,0 @@
-ArduinoJson - C++ JSON library for IoT
-====================
-
-[](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/master) [](https://travis-ci.org/bblanchon/ArduinoJson) [](https://coveralls.io/r/bblanchon/ArduinoJson?branch=master) [](https://github.com/bblanchon/ArduinoJson)
-
-*An elegant and efficient JSON library for embedded systems.*
-
-It's designed to have the most intuitive API, the smallest footprint and is able to work without any allocation on the heap (no malloc).
-
-It has been written with Arduino in mind, but it isn't linked to Arduino libraries so you can use this library in any other C++ project.
-For instance, it supports Aduino's `String` and `Stream`, but also `std::string`, `std::istream` and `std::ostream`.
-
-Features
---------
-
-* JSON decoding (comments are supported)
-* JSON encoding (with optional indentation)
-* Elegant API, very easy to use
-* Fixed memory allocation (zero malloc)
-* No data duplication (zero copy)
-* Portable (written in C++98)
-* Self-contained (no external dependency)
-* Small footprint
-* Header-only library
-* MIT License
-
-Works on
---------
-
-* All Arduino boards (Uno, Due, Mini, Micro, Yun...)
-* ESP8266
-* Teensy
-* Intel Edison and Galileo
-* PlatformIO
-* Energia
-* RedBearLab boards (BLE Nano...)
-* Computers (Windows, Linux, OSX...)
-
-See [FAQ: Compatibility issues](https://bblanchon.github.io/ArduinoJson/faq/compilation-fails-device-crashes-nothing-on-serial-console)
-
-Quick start
------------
-
-#### Decoding / Parsing
-
-```c++
-char json[] = "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
-
-StaticJsonBuffer<200> jsonBuffer;
-
-JsonObject& root = jsonBuffer.parseObject(json);
-
-const char* sensor = root["sensor"];
-long time = root["time"];
-double latitude = root["data"][0];
-double longitude = root["data"][1];
-```
-
-[See JsonParserExample.ino](examples/JsonParserExample/JsonParserExample.ino)
-
-#### Encoding / Generating
-
-```c++
-StaticJsonBuffer<200> jsonBuffer;
-
-JsonObject& root = jsonBuffer.createObject();
-root["sensor"] = "gps";
-root["time"] = 1351824120;
-
-JsonArray& data = root.createNestedArray("data");
-data.add(48.756080, 6); // 6 is the number of decimals to print
-data.add(2.302038, 6); // if not specified, 2 digits are printed
-
-root.printTo(Serial);
-// This prints:
-// {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
-```
-
-[See JsonGeneratorExample.ino](examples/JsonGeneratorExample/JsonGeneratorExample.ino)
-
-
-Documentation
--------------
-
-The documentation is available online in the [ArduinoJson wiki](https://github.com/bblanchon/ArduinoJson/wiki).
-
-The [ArduinoJson Assistant](https://bblanchon.github.io/ArduinoJson/assistant/) helps you get started with the library.
-
-
-Testimonials
-------------
-
-From Arduino's Forum user `jflaplante`:
-> I tried aJson json-arduino before trying your library. I always ran into memory problem after a while.
-> I have no such problem so far with your library. It is working perfectly with my web services.
-
-From StackOverflow user `thegreendroid`:
-> It has a really elegant, simple API and it works like a charm on embedded and Windows/Linux platforms. We recently started using this on an embedded project and I can vouch for its quality.
-
-From GitHub user `zacsketches`:
-> Thanks for a great library!!!
-> I've been watching you consistently develop this library over the past six months, and I used it today for a publish and subscribe architecture designed to help hobbyists move into more advanced robotics. Your library allowed me to implement remote subscription in order to facilitate multi-processor robots.
-> ArduinoJson saved me a week's worth of time!!
-
-[From Reddit user `erm_what_`](https://www.reddit.com/r/arduino/comments/3jj6ep/announcing_arduinojson_50/cusjk8c):
-> This is a great library and I wouldn't be able to do the project I'm doing without it. I completely recommend it.
-
-[From Reddit user `makerhacks`](https://www.reddit.com/r/arduino/comments/3jj6ep/announcing_arduinojson_50/cusqg7b):
-> I am just starting an ESP8266 clock project and now I can output JSON from my server script and interpret it painlessly.
-
-[From Twitter user `@hemalchevli`](https://twitter.com/hemalchevli/status/715788439397011456):
-> ArduinoJson library should be used as a benchmark/reference for making libraries. Truly elegant.
-
-[From GitHub user `sticilface`](https://github.com/bblanchon/ArduinoJson/issues/381#issuecomment-260203594):
-> its a great lib:) and i use it in everything!
-
-Donators
---------
-
-Special thanks to the following persons and companies who made generous donations to the library author:
-
-* Robert Murphy
-* Surge Communications
-* Alex Scott
-* Firepick Services LLC
-* A B Doodkorte
-* Scott Smith
-* Johann Stieger
-* Gustavo Donizeti Gini
-* Charles-Henri Hallard
-* Martijn van den Burg
-* Nick Koumaris
-* Jon Williams
-* Kestutis Liaugminas
-* Darlington Adibe
-* Yoeri Kroon
-* Andrew Melvin
-* Doanh Luong
-* Christoph Schmidt
-
----
-
-Found this library useful? Please star this project or [help me back with a donation!](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=donate%40benoitblanchon%2efr&lc=GB&item_name=Benoit%20Blanchon&item_number=Arduino%20JSON¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHosted) :smile:
diff --git a/lib-before-5.9.1f/ArduinoJson/appveyor.yml b/lib-before-5.9.1f/ArduinoJson/appveyor.yml
deleted file mode 100644
index ed98fb0ec..000000000
--- a/lib-before-5.9.1f/ArduinoJson/appveyor.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-version: 5.8.3.{build}
-environment:
- matrix:
- - CMAKE_GENERATOR: Visual Studio 14 2015
- - CMAKE_GENERATOR: Visual Studio 12 2013
- - CMAKE_GENERATOR: Visual Studio 11 2012
- - CMAKE_GENERATOR: Visual Studio 10 2010
-# - CMAKE_GENERATOR: MinGW Makefiles
-# Note: Disabled because of unexplicated error -1073741511
-# This used to work fine with GCC 4.8.2 then failed after they upgraded to GCC 4.9.3
-configuration: Debug
-before_build:
-- set PATH=C:\MinGW\bin;%PATH:C:\Program Files\Git\usr\bin;=% # Workaround for CMake not wanting sh.exe on PATH for MinGW
-- cmake -DCMAKE_BUILD_TYPE=%CONFIGURATION% -G "%CMAKE_GENERATOR%" .
-build_script:
-- cmake --build . --config %CONFIGURATION%
-test_script:
-- ctest -V .
diff --git a/lib-before-5.9.1f/ArduinoJson/examples/IndentedPrintExample/IndentedPrintExample.ino b/lib-before-5.9.1f/ArduinoJson/examples/IndentedPrintExample/IndentedPrintExample.ino
deleted file mode 100644
index 35fb0c20e..000000000
--- a/lib-before-5.9.1f/ArduinoJson/examples/IndentedPrintExample/IndentedPrintExample.ino
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#include
-
-using namespace ArduinoJson::Internals;
-
-void setup() {
- Serial.begin(9600);
- while (!Serial) {
- // wait serial port initialization
- }
-
- IndentedPrint serial(Serial);
- serial.setTabSize(4);
-
- serial.println("This is at indentation 0");
- serial.indent();
- serial.println("This is at indentation 1");
- serial.println("This is also at indentation 1");
- serial.indent();
- serial.println("This is at indentation 2");
-
- serial.unindent();
- serial.unindent();
- serial.println("This is back at indentation 0");
-}
-
-void loop() {
- // not used in this example
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/examples/JsonGeneratorExample/JsonGeneratorExample.ino b/lib-before-5.9.1f/ArduinoJson/examples/JsonGeneratorExample/JsonGeneratorExample.ino
deleted file mode 100644
index dd912f113..000000000
--- a/lib-before-5.9.1f/ArduinoJson/examples/JsonGeneratorExample/JsonGeneratorExample.ino
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#include
-
-void setup() {
- Serial.begin(9600);
- while (!Serial) {
- // wait serial port initialization
- }
-
- // Memory pool for JSON object tree.
- //
- // Inside the brackets, 200 is the size of the pool in bytes.
- // If the JSON object is more complex, you need to increase that value.
- StaticJsonBuffer<200> jsonBuffer;
-
- // StaticJsonBuffer allocates memory on the stack, it can be
- // replaced by DynamicJsonBuffer which allocates in the heap.
- // It's simpler but less efficient.
- //
- // DynamicJsonBuffer jsonBuffer;
-
- // Create the root of the object tree.
- //
- // It's a reference to the JsonObject, the actual bytes are inside the
- // JsonBuffer with all the other nodes of the object tree.
- // Memory is freed when jsonBuffer goes out of scope.
- JsonObject& root = jsonBuffer.createObject();
-
- // Add values in the object
- //
- // Most of the time, you can rely on the implicit casts.
- // In other case, you can do root.set("time", 1351824120);
- root["sensor"] = "gps";
- root["time"] = 1351824120;
-
- // Add a nested array.
- //
- // It's also possible to create the array separately and add it to the
- // JsonObject but it's less efficient.
- JsonArray& data = root.createNestedArray("data");
- data.add(double_with_n_digits(48.756080, 6));
- data.add(double_with_n_digits(2.302038, 6));
-
- root.printTo(Serial);
- // This prints:
- // {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
-
- Serial.println();
-
- root.prettyPrintTo(Serial);
- // This prints:
- // {
- // "sensor": "gps",
- // "time": 1351824120,
- // "data": [
- // 48.756080,
- // 2.302038
- // ]
- // }
-}
-
-void loop() {
- // not used in this example
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/examples/JsonHttpClient/JsonHttpClient.ino b/lib-before-5.9.1f/ArduinoJson/examples/JsonHttpClient/JsonHttpClient.ino
deleted file mode 100644
index 35954fb6e..000000000
--- a/lib-before-5.9.1f/ArduinoJson/examples/JsonHttpClient/JsonHttpClient.ino
+++ /dev/null
@@ -1,184 +0,0 @@
-// Sample Arduino Json Web Client
-// Downloads and parse http://jsonplaceholder.typicode.com/users/1
-//
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#include
-#include
-#include
-
-EthernetClient client;
-
-const char* server = "jsonplaceholder.typicode.com"; // server's address
-const char* resource = "/users/1"; // http resource
-const unsigned long BAUD_RATE = 9600; // serial connection speed
-const unsigned long HTTP_TIMEOUT = 10000; // max respone time from server
-const size_t MAX_CONTENT_SIZE = 512; // max size of the HTTP response
-
-// The type of data that we want to extract from the page
-struct UserData {
- char name[32];
- char company[32];
-};
-
-// ARDUINO entry point #1: runs once when you press reset or power the board
-void setup() {
- initSerial();
- initEthernet();
-}
-
-// ARDUINO entry point #2: runs over and over again forever
-void loop() {
- if (connect(server)) {
- if (sendRequest(server, resource) && skipResponseHeaders()) {
- UserData userData;
- if (readReponseContent(&userData)) {
- printUserData(&userData);
- }
- }
- }
- disconnect();
- wait();
-}
-
-// Initialize Serial port
-void initSerial() {
- Serial.begin(BAUD_RATE);
- while (!Serial) {
- ; // wait for serial port to initialize
- }
- Serial.println("Serial ready");
-}
-
-// Initialize Ethernet library
-void initEthernet() {
- byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
- if (!Ethernet.begin(mac)) {
- Serial.println("Failed to configure Ethernet");
- return;
- }
- Serial.println("Ethernet ready");
- delay(1000);
-}
-
-// Open connection to the HTTP server
-bool connect(const char* hostName) {
- Serial.print("Connect to ");
- Serial.println(hostName);
-
- bool ok = client.connect(hostName, 80);
-
- Serial.println(ok ? "Connected" : "Connection Failed!");
- return ok;
-}
-
-// Send the HTTP GET request to the server
-bool sendRequest(const char* host, const char* resource) {
- Serial.print("GET ");
- Serial.println(resource);
-
- client.print("GET ");
- client.print(resource);
- client.println(" HTTP/1.0");
- client.print("Host: ");
- client.println(host);
- client.println("Connection: close");
- client.println();
-
- return true;
-}
-
-// Skip HTTP headers so that we are at the beginning of the response's body
-bool skipResponseHeaders() {
- // HTTP headers end with an empty line
- char endOfHeaders[] = "\r\n\r\n";
-
- client.setTimeout(HTTP_TIMEOUT);
- bool ok = client.find(endOfHeaders);
-
- if (!ok) {
- Serial.println("No response or invalid response!");
- }
-
- return ok;
-}
-
-// Parse the JSON from the input string and extract the interesting values
-// Here is the JSON we need to parse
-// {
-// "id": 1,
-// "name": "Leanne Graham",
-// "username": "Bret",
-// "email": "Sincere@april.biz",
-// "address": {
-// "street": "Kulas Light",
-// "suite": "Apt. 556",
-// "city": "Gwenborough",
-// "zipcode": "92998-3874",
-// "geo": {
-// "lat": "-37.3159",
-// "lng": "81.1496"
-// }
-// },
-// "phone": "1-770-736-8031 x56442",
-// "website": "hildegard.org",
-// "company": {
-// "name": "Romaguera-Crona",
-// "catchPhrase": "Multi-layered client-server neural-net",
-// "bs": "harness real-time e-markets"
-// }
-// }
-bool readReponseContent(struct UserData* userData) {
- // Compute optimal size of the JSON buffer according to what we need to parse.
- // This is only required if you use StaticJsonBuffer.
- const size_t BUFFER_SIZE =
- JSON_OBJECT_SIZE(8) // the root object has 8 elements
- + JSON_OBJECT_SIZE(5) // the "address" object has 5 elements
- + JSON_OBJECT_SIZE(2) // the "geo" object has 2 elements
- + JSON_OBJECT_SIZE(3) // the "company" object has 3 elements
- + MAX_CONTENT_SIZE; // additional space for strings
-
- // Allocate a temporary memory pool
- DynamicJsonBuffer jsonBuffer(BUFFER_SIZE);
-
- JsonObject& root = jsonBuffer.parseObject(client);
-
- if (!root.success()) {
- Serial.println("JSON parsing failed!");
- return false;
- }
-
- // Here were copy the strings we're interested in
- strcpy(userData->name, root["name"]);
- strcpy(userData->company, root["company"]["name"]);
- // It's not mandatory to make a copy, you could just use the pointers
- // Since, they are pointing inside the "content" buffer, so you need to make
- // sure it's still in memory when you read the string
-
- return true;
-}
-
-// Print the data extracted from the JSON
-void printUserData(const struct UserData* userData) {
- Serial.print("Name = ");
- Serial.println(userData->name);
- Serial.print("Company = ");
- Serial.println(userData->company);
-}
-
-// Close the connection with the HTTP server
-void disconnect() {
- Serial.println("Disconnect");
- client.stop();
-}
-
-// Pause for a 1 minute
-void wait() {
- Serial.println("Wait 60 seconds");
- delay(60000);
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/examples/JsonParserExample/JsonParserExample.ino b/lib-before-5.9.1f/ArduinoJson/examples/JsonParserExample/JsonParserExample.ino
deleted file mode 100644
index ee215f649..000000000
--- a/lib-before-5.9.1f/ArduinoJson/examples/JsonParserExample/JsonParserExample.ino
+++ /dev/null
@@ -1,67 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#include
-
-void setup() {
- Serial.begin(9600);
- while (!Serial) {
- // wait serial port initialization
- }
-
- // Memory pool for JSON object tree.
- //
- // Inside the brackets, 200 is the size of the pool in bytes,
- // If the JSON object is more complex, you need to increase that value.
- StaticJsonBuffer<200> jsonBuffer;
-
- // StaticJsonBuffer allocates memory on the stack, it can be
- // replaced by DynamicJsonBuffer which allocates in the heap.
- // It's simpler but less efficient.
- //
- // DynamicJsonBuffer jsonBuffer;
-
- // JSON input string.
- //
- // It's better to use a char[] as shown here.
- // If you use a const char* or a String, ArduinoJson will
- // have to make a copy of the input in the JsonBuffer.
- char json[] =
- "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
-
- // Root of the object tree.
- //
- // It's a reference to the JsonObject, the actual bytes are inside the
- // JsonBuffer with all the other nodes of the object tree.
- // Memory is freed when jsonBuffer goes out of scope.
- JsonObject& root = jsonBuffer.parseObject(json);
-
- // Test if parsing succeeds.
- if (!root.success()) {
- Serial.println("parseObject() failed");
- return;
- }
-
- // Fetch values.
- //
- // Most of the time, you can rely on the implicit casts.
- // In other case, you can do root["time"].as();
- const char* sensor = root["sensor"];
- long time = root["time"];
- double latitude = root["data"][0];
- double longitude = root["data"][1];
-
- // Print values.
- Serial.println(sensor);
- Serial.println(time);
- Serial.println(latitude, 6);
- Serial.println(longitude, 6);
-}
-
-void loop() {
- // not used in this example
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/examples/JsonServer/JsonServer.ino b/lib-before-5.9.1f/ArduinoJson/examples/JsonServer/JsonServer.ino
deleted file mode 100644
index d3fec3ece..000000000
--- a/lib-before-5.9.1f/ArduinoJson/examples/JsonServer/JsonServer.ino
+++ /dev/null
@@ -1,74 +0,0 @@
-// Sample Arduino Json Web Server
-// Created by Benoit Blanchon.
-// Heavily inspired by "Web Server" from David A. Mellis and Tom Igoe
-
-#include
-#include
-#include
-
-byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
-IPAddress ip(192, 168, 0, 177);
-EthernetServer server(80);
-
-bool readRequest(EthernetClient& client) {
- bool currentLineIsBlank = true;
- while (client.connected()) {
- if (client.available()) {
- char c = client.read();
- if (c == '\n' && currentLineIsBlank) {
- return true;
- } else if (c == '\n') {
- currentLineIsBlank = true;
- } else if (c != '\r') {
- currentLineIsBlank = false;
- }
- }
- }
- return false;
-}
-
-JsonObject& prepareResponse(JsonBuffer& jsonBuffer) {
- JsonObject& root = jsonBuffer.createObject();
-
- JsonArray& analogValues = root.createNestedArray("analog");
- for (int pin = 0; pin < 6; pin++) {
- int value = analogRead(pin);
- analogValues.add(value);
- }
-
- JsonArray& digitalValues = root.createNestedArray("digital");
- for (int pin = 0; pin < 14; pin++) {
- int value = digitalRead(pin);
- digitalValues.add(value);
- }
-
- return root;
-}
-
-void writeResponse(EthernetClient& client, JsonObject& json) {
- client.println("HTTP/1.1 200 OK");
- client.println("Content-Type: application/json");
- client.println("Connection: close");
- client.println();
-
- json.prettyPrintTo(client);
-}
-
-void setup() {
- Ethernet.begin(mac, ip);
- server.begin();
-}
-
-void loop() {
- EthernetClient client = server.available();
- if (client) {
- bool success = readRequest(client);
- if (success) {
- StaticJsonBuffer<500> jsonBuffer;
- JsonObject& json = prepareResponse(jsonBuffer);
- writeResponse(client, json);
- }
- delay(1);
- client.stop();
- }
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/examples/JsonUdpBeacon/JsonUdpBeacon.ino b/lib-before-5.9.1f/ArduinoJson/examples/JsonUdpBeacon/JsonUdpBeacon.ino
deleted file mode 100644
index 2975fad4c..000000000
--- a/lib-before-5.9.1f/ArduinoJson/examples/JsonUdpBeacon/JsonUdpBeacon.ino
+++ /dev/null
@@ -1,55 +0,0 @@
-// Send a JSON object on UDP at regular interval
-//
-// You can easily test this program with netcat:
-// $ nc -ulp 8888
-//
-// by Benoit Blanchon, MIT License 2015-2017
-
-#include
-#include
-#include
-
-byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
-IPAddress localIp(192, 168, 0, 177);
-IPAddress remoteIp(192, 168, 0, 109);
-unsigned int remotePort = 8888;
-unsigned localPort = 8888;
-EthernetUDP udp;
-
-JsonObject& buildJson(JsonBuffer& jsonBuffer) {
- JsonObject& root = jsonBuffer.createObject();
-
- JsonArray& analogValues = root.createNestedArray("analog");
- for (int pin = 0; pin < 6; pin++) {
- int value = analogRead(pin);
- analogValues.add(value);
- }
-
- JsonArray& digitalValues = root.createNestedArray("digital");
- for (int pin = 0; pin < 14; pin++) {
- int value = digitalRead(pin);
- digitalValues.add(value);
- }
-
- return root;
-}
-
-void sendJson(JsonObject& json) {
- udp.beginPacket(remoteIp, remotePort);
- json.printTo(udp);
- udp.println();
- udp.endPacket();
-}
-
-void setup() {
- Ethernet.begin(mac, localIp);
- udp.begin(localPort);
-}
-
-void loop() {
- delay(1000);
-
- StaticJsonBuffer<300> jsonBuffer;
- JsonObject& json = buildJson(jsonBuffer);
- sendJson(json);
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/examples/ProgmemExample/ProgmemExample.ino b/lib-before-5.9.1f/ArduinoJson/examples/ProgmemExample/ProgmemExample.ino
deleted file mode 100644
index dc8dd4bc0..000000000
--- a/lib-before-5.9.1f/ArduinoJson/examples/ProgmemExample/ProgmemExample.ino
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#include
-
-// About
-// -----
-// This example shows the different ways you can use PROGMEM with ArduinoJson.
-// Please don't see this as an invitation to use PROGMEM.
-// On the contrary, you should always use char[] when possible, it's much more
-// efficient in term of code size, speed and memory usage.
-
-void setup() {
-#ifdef PROGMEM
- DynamicJsonBuffer jsonBuffer;
-
- // You can use a Flash String as your JSON input.
- // WARNING: the content of the Flash String will be duplicated in the
- // JsonBuffer.
- JsonObject& root =
- jsonBuffer.parseObject(F("{\"sensor\":\"gps\",\"time\":1351824120,"
- "\"data\":[48.756080,2.302038]}"));
-
- // You can use a Flash String to get an element of a JsonObject
- // No duplication is done.
- long time = root[F("time")];
-
- // You can use a Flash String to set an element of a JsonObject
- // WARNING: the content of the Flash String will be duplicated in the
- // JsonBuffer.
- root[F("time")] = time;
-
- // You can set a Flash String to a JsonObject or JsonArray:
- // WARNING: the content of the Flash String will be duplicated in the
- // JsonBuffer.
- root["sensor"] = F("gps");
-
- // You can compare the content of a JsonVariant to a Flash String
- if (root["sensor"] == F("gps")) {
- // ...
- }
-
-#else
-
-#warning PROGMEM is not supported on this platform
-
-#endif
-}
-
-void loop() {
- // not used in this example
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/examples/StringExample/StringExample.ino b/lib-before-5.9.1f/ArduinoJson/examples/StringExample/StringExample.ino
deleted file mode 100644
index f76f9dbe2..000000000
--- a/lib-before-5.9.1f/ArduinoJson/examples/StringExample/StringExample.ino
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#include
-
-// About
-// -----
-// This example shows the different ways you can use String with ArduinoJson.
-// Please don't see this as an invitation to use String.
-// On the contrary, you should always use char[] when possible, it's much more
-// efficient in term of code size, speed and memory usage.
-
-void setup() {
- DynamicJsonBuffer jsonBuffer;
-
- // You can use a String as your JSON input.
- // WARNING: the content of the String will be duplicated in the JsonBuffer.
- String input =
- "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
- JsonObject& root = jsonBuffer.parseObject(input);
-
- // You can use a String to get an element of a JsonObject
- // No duplication is done.
- long time = root[String("time")];
-
- // You can use a String to set an element of a JsonObject
- // WARNING: the content of the String will be duplicated in the JsonBuffer.
- root[String("time")] = time;
-
- // You can get a String from a JsonObject or JsonArray:
- // No duplication is done, at least not in the JsonBuffer.
- String sensor = root["sensor"];
-
- // Unfortunately, the following doesn't work (issue #118):
- // sensor = root["sensor"]; // <- error "ambiguous overload for 'operator='"
- // As a workaround, you need to replace by:
- sensor = root["sensor"].as();
-
- // You can set a String to a JsonObject or JsonArray:
- // WARNING: the content of the String will be duplicated in the JsonBuffer.
- root["sensor"] = sensor;
-
- // You can also concatenate strings
- // WARNING: the content of the String will be duplicated in the JsonBuffer.
- root[String("sen") + "sor"] = String("gp") + "s";
-
- // You can compare the content of a JsonObject with a String
- if (root["sensor"] == sensor) {
- // ...
- }
-
- // Lastly, you can print the resulting JSON to a String
- String output;
- root.printTo(output);
-}
-
-void loop() {
- // not used in this example
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/fuzzing/Makefile b/lib-before-5.9.1f/ArduinoJson/fuzzing/Makefile
deleted file mode 100644
index 2e90a475e..000000000
--- a/lib-before-5.9.1f/ArduinoJson/fuzzing/Makefile
+++ /dev/null
@@ -1,19 +0,0 @@
-# CAUTION: this file is invoked by https://github.com/google/oss-fuzz
-
-CXXFLAGS += -I../include
-
-all: \
- $(OUT)/json_fuzzer \
- $(OUT)/json_fuzzer_seed_corpus.zip \
- $(OUT)/json_fuzzer.options
-
-$(OUT)/json_fuzzer: fuzzer.cpp
- $(CXX) $(CXXFLAGS) $< -o$@ $(LIB_FUZZING_ENGINE)
-
-$(OUT)/json_fuzzer_seed_corpus.zip: seed_corpus/*
- zip -j $@ $?
-
-$(OUT)/json_fuzzer.options:
- @echo "[libfuzzer]" > $@
- @echo "max_len = 256" >> $@
- @echo "timeout = 10" >> $@
diff --git a/lib-before-5.9.1f/ArduinoJson/fuzzing/fuzz.sh b/lib-before-5.9.1f/ArduinoJson/fuzzing/fuzz.sh
deleted file mode 100644
index 0a7399c58..000000000
--- a/lib-before-5.9.1f/ArduinoJson/fuzzing/fuzz.sh
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/bash
-# This script mimics an invocation from https://github.com/google/oss-fuzz
-
-export CXX='clang++'
-export CXXFLAGS='-fsanitize-coverage=trace-pc-guard -fsanitize=address'
-export LIB_FUZZING_ENGINE=-lFuzzer
-make OUT=.
-./json_fuzzer my_corpus seed_corpus
diff --git a/lib-before-5.9.1f/ArduinoJson/fuzzing/fuzzer.cpp b/lib-before-5.9.1f/ArduinoJson/fuzzing/fuzzer.cpp
deleted file mode 100644
index acc8a6a23..000000000
--- a/lib-before-5.9.1f/ArduinoJson/fuzzing/fuzzer.cpp
+++ /dev/null
@@ -1,23 +0,0 @@
-#include
-
-class memstream : public std::istream {
- struct membuf : std::streambuf {
- membuf(const uint8_t *p, size_t l) {
- setg((char *)p, (char *)p, (char *)p + l);
- }
- };
- membuf _buffer;
-
- public:
- memstream(const uint8_t *p, size_t l)
- : std::istream(&_buffer), _buffer(p, l) {
- rdbuf(&_buffer);
- }
-};
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
- DynamicJsonBuffer jsonBuffer;
- memstream json(data, size);
- jsonBuffer.parse(json);
- return 0;
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/fuzzing/my_corpus/.gitignore b/lib-before-5.9.1f/ArduinoJson/fuzzing/my_corpus/.gitignore
deleted file mode 100644
index d6b7ef32c..000000000
--- a/lib-before-5.9.1f/ArduinoJson/fuzzing/my_corpus/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*
-!.gitignore
diff --git a/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/ArduinoJson.json b/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/ArduinoJson.json
deleted file mode 100644
index 0cd316709..000000000
--- a/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/ArduinoJson.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "sensor": "gps",
- "time": 1351824120,
- "data": [
- 48.75608,
- 2.302038
- ]
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/OpenWeatherMap.json b/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/OpenWeatherMap.json
deleted file mode 100644
index 27d6bafd4..000000000
--- a/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/OpenWeatherMap.json
+++ /dev/null
@@ -1,53 +0,0 @@
-{
- "coord": {
- "lon": -0.13,
- "lat": 51.51
- },
- "weather": [
- {
- "id": 301,
- "main": "Drizzle",
- "description": "drizzle",
- "icon": "09n"
- },
- {
- "id": 701,
- "main": "Mist",
- "description": "mist",
- "icon": "50n"
- },
- {
- "id": 741,
- "main": "Fog",
- "description": "fog",
- "icon": "50n"
- }
- ],
- "base": "stations",
- "main": {
- "temp": 281.87,
- "pressure": 1032,
- "humidity": 100,
- "temp_min": 281.15,
- "temp_max": 283.15
- },
- "visibility": 2900,
- "wind": {
- "speed": 1.5
- },
- "clouds": {
- "all": 90
- },
- "dt": 1483820400,
- "sys": {
- "type": 1,
- "id": 5091,
- "message": 0.0226,
- "country": "GB",
- "sunrise": 1483776245,
- "sunset": 1483805443
- },
- "id": 2643743,
- "name": "London",
- "cod": 200
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/WeatherUnderground.json b/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/WeatherUnderground.json
deleted file mode 100644
index d53ce0064..000000000
--- a/lib-before-5.9.1f/ArduinoJson/fuzzing/seed_corpus/WeatherUnderground.json
+++ /dev/null
@@ -1,90 +0,0 @@
-{
- "response": {
- "version": "0.1",
- "termsofService": "http://www.wunderground.com/weather/api/d/terms.html",
- "features": {
- "conditions": 1
- }
- },
- "current_observation": {
- "image": {
- "url": "http://icons-ak.wxug.com/graphics/wu2/logo_130x80.png",
- "title": "Weather Underground",
- "link": "http://www.wunderground.com"
- },
- "display_location": {
- "full": "San Francisco, CA",
- "city": "San Francisco",
- "state": "CA",
- "state_name": "California",
- "country": "US",
- "country_iso3166": "US",
- "zip": "94101",
- "latitude": "37.77500916",
- "longitude": "-122.41825867",
- "elevation": "47.00000000"
- },
- "observation_location": {
- "full": "SOMA - Near Van Ness, San Francisco, California",
- "city": "SOMA - Near Van Ness, San Francisco",
- "state": "California",
- "country": "US",
- "country_iso3166": "US",
- "latitude": "37.773285",
- "longitude": "-122.417725",
- "elevation": "49 ft"
- },
- "estimated": {},
- "station_id": "KCASANFR58",
- "observation_time": "Last Updated on June 27, 5:27 PM PDT",
- "observation_time_rfc822": "Wed, 27 Jun 2012 17:27:13 -0700",
- "observation_epoch": "1340843233",
- "local_time_rfc822": "Wed, 27 Jun 2012 17:27:14 -0700",
- "local_epoch": "1340843234",
- "local_tz_short": "PDT",
- "local_tz_long": "America/Los_Angeles",
- "local_tz_offset": "-0700",
- "weather": "Partly Cloudy",
- "temperature_string": "66.3 F (19.1 C)",
- "temp_f": 66.3,
- "temp_c": 19.1,
- "relative_humidity": "65%",
- "wind_string": "From the NNW at 22.0 MPH Gusting to 28.0 MPH",
- "wind_dir": "NNW",
- "wind_degrees": 346,
- "wind_mph": 22,
- "wind_gust_mph": "28.0",
- "wind_kph": 35.4,
- "wind_gust_kph": "45.1",
- "pressure_mb": "1013",
- "pressure_in": "29.93",
- "pressure_trend": "+",
- "dewpoint_string": "54 F (12 C)",
- "dewpoint_f": 54,
- "dewpoint_c": 12,
- "heat_index_string": "NA",
- "heat_index_f": "NA",
- "heat_index_c": "NA",
- "windchill_string": "NA",
- "windchill_f": "NA",
- "windchill_c": "NA",
- "feelslike_string": "66.3 F (19.1 C)",
- "feelslike_f": "66.3",
- "feelslike_c": "19.1",
- "visibility_mi": "10.0",
- "visibility_km": "16.1",
- "solarradiation": "",
- "UV": "5",
- "precip_1hr_string": "0.00 in ( 0 mm)",
- "precip_1hr_in": "0.00",
- "precip_1hr_metric": " 0",
- "precip_today_string": "0.00 in (0 mm)",
- "precip_today_in": "0.00",
- "precip_today_metric": "0",
- "icon": "partlycloudy",
- "icon_url": "http://icons-ak.wxug.com/i/c/k/partlycloudy.gif",
- "forecast_url": "http://www.wunderground.com/US/CA/San_Francisco.html",
- "history_url": "http://www.wunderground.com/history/airport/KCASANFR58/2012/6/27/DailyHistory.html",
- "ob_url": "http://www.wunderground.com/cgi-bin/findweather/getForecast?query=37.773285,-122.417725"
- }
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson.h b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson.h
deleted file mode 100644
index 48609d849..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson.h
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#include "ArduinoJson.hpp"
-using namespace ArduinoJson;
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson.hpp
deleted file mode 100644
index 3031f5922..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "ArduinoJson/DynamicJsonBuffer.hpp"
-#include "ArduinoJson/JsonArray.hpp"
-#include "ArduinoJson/JsonObject.hpp"
-#include "ArduinoJson/JsonVariantComparisons.hpp"
-#include "ArduinoJson/StaticJsonBuffer.hpp"
-
-#include "ArduinoJson/Deserialization/JsonParserImpl.hpp"
-#include "ArduinoJson/JsonArrayImpl.hpp"
-#include "ArduinoJson/JsonBufferImpl.hpp"
-#include "ArduinoJson/JsonObjectImpl.hpp"
-#include "ArduinoJson/JsonVariantImpl.hpp"
-#include "ArduinoJson/Serialization/JsonSerializerImpl.hpp"
-
-using namespace ArduinoJson;
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Configuration.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Configuration.hpp
deleted file mode 100644
index ba8a90df4..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Configuration.hpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-// enable deprecated functions by default
-#ifndef ARDUINOJSON_ENABLE_DEPRECATED
-#define ARDUINOJSON_ENABLE_DEPRECATED 1
-#endif
-
-#ifdef ARDUINO // assume this is an embedded platform
-
-// store using float instead of double to reduce the memory usage (issue #134)
-#ifndef ARDUINOJSON_USE_DOUBLE
-#define ARDUINOJSON_USE_DOUBLE 0
-#endif
-
-// store using a long because it usually match the size of a float.
-#ifndef ARDUINOJSON_USE_LONG_LONG
-#define ARDUINOJSON_USE_LONG_LONG 0
-#endif
-#ifndef ARDUINOJSON_USE_INT64
-#define ARDUINOJSON_USE_INT64 0
-#endif
-
-// Arduino has its own implementation of String to replace std::string
-#ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING
-#define ARDUINOJSON_ENABLE_ARDUINO_STRING 1
-#endif
-
-#ifndef ARDUINOJSON_ENABLE_ARDUINO_STREAM
-#define ARDUINOJSON_ENABLE_ARDUINO_STREAM 1
-#endif
-
-// On AVR archiecture, we can use PROGMEM
-#ifndef ARDUINOJSON_ENABLE_PROGMEM
-#ifdef PROGMEM
-#define ARDUINOJSON_ENABLE_PROGMEM 1
-#else
-#define ARDUINOJSON_ENABLE_PROGMEM 0
-#endif
-#endif
-
-// Arduino doesn't have std::string
-#ifndef ARDUINOJSON_ENABLE_STD_STRING
-#define ARDUINOJSON_ENABLE_STD_STRING 0
-#endif
-
-// Arduino doesn't support STL stream
-#ifndef ARDUINOJSON_ENABLE_STD_STREAM
-#define ARDUINOJSON_ENABLE_STD_STREAM 0
-#endif
-
-#ifndef ARDUINOJSON_ENABLE_ALIGNMENT
-#ifdef ARDUINO_ARCH_AVR
-// alignment isn't needed for 8-bit AVR
-#define ARDUINOJSON_ENABLE_ALIGNMENT 0
-#else
-// but must processor needs pointer to be align on word size
-#define ARDUINOJSON_ENABLE_ALIGNMENT 1
-#endif
-#endif
-
-// low value to prevent stack overflow
-#ifndef ARDUINOJSON_DEFAULT_NESTING_LIMIT
-#define ARDUINOJSON_DEFAULT_NESTING_LIMIT 10
-#endif
-
-#else // assume this is a computer
-
-// on a computer we have plenty of memory so we can use doubles
-#ifndef ARDUINOJSON_USE_DOUBLE
-#define ARDUINOJSON_USE_DOUBLE 1
-#endif
-
-// use long long when available
-#ifndef ARDUINOJSON_USE_LONG_LONG
-#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1800)
-#define ARDUINOJSON_USE_LONG_LONG 1
-#else
-#define ARDUINOJSON_USE_LONG_LONG 0
-#endif
-#endif
-
-// use _int64 on old versions of Visual Studio
-#ifndef ARDUINOJSON_USE_INT64
-#if defined(_MSC_VER) && _MSC_VER <= 1700
-#define ARDUINOJSON_USE_INT64 1
-#else
-#define ARDUINOJSON_USE_INT64 0
-#endif
-#endif
-
-// on a computer, we can use std::string
-#ifndef ARDUINOJSON_ENABLE_STD_STRING
-#define ARDUINOJSON_ENABLE_STD_STRING 1
-#endif
-
-// on a computer, there is no reason to beleive Arduino String is available
-#ifndef ARDUINOJSON_ENABLE_ARDUINO_STRING
-#define ARDUINOJSON_ENABLE_ARDUINO_STRING 0
-#endif
-
-// PROGMEM is only available on AVR architecture
-#ifndef ARDUINOJSON_ENABLE_PROGMEM
-#define ARDUINOJSON_ENABLE_PROGMEM 0
-#endif
-
-// on a computer, we can assume that the STL is there
-#ifndef ARDUINOJSON_ENABLE_STD_STREAM
-#define ARDUINOJSON_ENABLE_STD_STREAM 1
-#endif
-
-// on a computer, there is no reason to beleive Arduino Stream is available
-#ifndef ARDUINOJSON_ENABLE_ARDUINO_STREAM
-#define ARDUINOJSON_ENABLE_ARDUINO_STREAM 0
-#endif
-
-#ifndef ARDUINOJSON_ENABLE_ALIGNMENT
-// even if not required, most cpu's are faster with aligned pointers
-#define ARDUINOJSON_ENABLE_ALIGNMENT 1
-#endif
-
-// on a computer, we should have a lot of space on the stack
-#ifndef ARDUINOJSON_DEFAULT_NESTING_LIMIT
-#define ARDUINOJSON_DEFAULT_NESTING_LIMIT 50
-#endif
-
-#endif
-
-#if ARDUINOJSON_USE_LONG_LONG && ARDUINOJSON_USE_INT64
-#error ARDUINOJSON_USE_LONG_LONG and ARDUINOJSON_USE_INT64 cannot be set together
-#endif
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/Encoding.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/Encoding.hpp
deleted file mode 100644
index 27d13517f..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/Encoding.hpp
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../Print.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-class Encoding {
- public:
- // Optimized for code size on a 8-bit AVR
- static char escapeChar(char c) {
- const char *p = escapeTable(false);
- while (p[0] && p[1] != c) {
- p += 2;
- }
- return p[0];
- }
-
- // Optimized for code size on a 8-bit AVR
- static char unescapeChar(char c) {
- const char *p = escapeTable(true);
- for (;;) {
- if (p[0] == '\0') return c;
- if (p[0] == c) return p[1];
- p += 2;
- }
- }
-
- private:
- static const char *escapeTable(bool excludeIdenticals) {
- return &"\"\"\\\\b\bf\fn\nr\rt\t"[excludeIdenticals ? 4 : 0];
- }
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonBufferAllocated.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonBufferAllocated.hpp
deleted file mode 100644
index 0004949bb..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonBufferAllocated.hpp
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../JsonBuffer.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-class JsonBufferAllocated {
- public:
- void *operator new(size_t n, JsonBuffer *jsonBuffer) throw() {
- if (!jsonBuffer) return NULL;
- return jsonBuffer->alloc(n);
- }
-
- void operator delete(void *, JsonBuffer *)throw() {}
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonFloat.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonFloat.hpp
deleted file mode 100644
index 40276fdcd..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonFloat.hpp
+++ /dev/null
@@ -1,21 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../Configuration.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-#if ARDUINOJSON_USE_DOUBLE
-typedef double JsonFloat;
-#else
-typedef float JsonFloat;
-#endif
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonInteger.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonInteger.hpp
deleted file mode 100644
index d8fefa46a..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonInteger.hpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../Configuration.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-#if ARDUINOJSON_USE_LONG_LONG
-typedef long long JsonInteger;
-typedef unsigned long long JsonUInt;
-#elif ARDUINOJSON_USE_INT64
-typedef __int64 JsonInteger;
-typedef unsigned _int64 JsonUInt;
-#else
-typedef long JsonInteger;
-typedef unsigned long JsonUInt;
-#endif
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantAs.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantAs.hpp
deleted file mode 100644
index f8e6cd1e7..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantAs.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-namespace ArduinoJson {
-namespace Internals {
-
-// A metafunction that returns the type of the value returned by
-// JsonVariant::as()
-template
-struct JsonVariantAs {
- typedef T type;
-};
-
-template <>
-struct JsonVariantAs {
- typedef const char* type;
-};
-
-template <>
-struct JsonVariantAs {
- typedef JsonArray& type;
-};
-
-template <>
-struct JsonVariantAs {
- typedef const JsonArray& type;
-};
-
-template <>
-struct JsonVariantAs {
- typedef JsonObject& type;
-};
-
-template <>
-struct JsonVariantAs {
- typedef const JsonObject& type;
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantComparer.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantComparer.hpp
deleted file mode 100644
index 9a198253e..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantComparer.hpp
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../JsonVariantBase.hpp"
-#include "../StringTraits/StringTraits.hpp"
-#include "../TypeTraits/EnableIf.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-template
-struct JsonVariantComparer {};
-
-template
-struct JsonVariantComparer<
- TString,
- typename TypeTraits::EnableIf::value>::type> {
- template
- static bool equals(const JsonVariantBase &variant,
- const TString &comparand) {
- const char *value = variant.template as();
- return Internals::StringTraits::equals(comparand, value);
- }
-};
-
-template
-struct JsonVariantComparer<
- TComparand, typename TypeTraits::EnableIf<
- !TypeTraits::IsVariant::value &&
- !TypeTraits::IsString::value>::type> {
- template
- static bool equals(const JsonVariantBase &variant,
- const TComparand &comparand) {
- return variant.template as() == comparand;
- }
-};
-
-template
-struct JsonVariantComparer::value>::type> {
- template
- static bool equals(const JsonVariantBase &left,
- const TVariant2 &right) {
- if (left.template is() && right.template is())
- return left.template as() == right.template as();
- if (left.template is() && right.template is())
- return left.template as() ==
- right.template as();
- if (left.template is() && right.template is())
- return left.template as() == right.template as();
- if (left.template is() && right.template is())
- return left.template as() == right.template as();
- if (left.template is() && right.template is())
- return left.template as() == right.template as();
- if (left.template is() && right.template is())
- return strcmp(left.template as(), right.template as()) ==
- 0;
-
- return false;
- }
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantContent.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantContent.hpp
deleted file mode 100644
index ca86020a3..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantContent.hpp
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "JsonFloat.hpp"
-#include "JsonInteger.hpp"
-
-namespace ArduinoJson {
-
-// Forward declarations
-class JsonArray;
-class JsonObject;
-
-namespace Internals {
-// A union that defines the actual content of a JsonVariant.
-// The enum JsonVariantType determines which member is in use.
-union JsonVariantContent {
- JsonFloat asFloat; // used for double and float
- JsonUInt asInteger; // used for bool, char, short, int and longs
- const char* asString; // asString can be null
- JsonArray* asArray; // asArray cannot be null
- JsonObject* asObject; // asObject cannot be null
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantDefault.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantDefault.hpp
deleted file mode 100644
index 4e69a5700..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantDefault.hpp
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-namespace ArduinoJson {
-namespace Internals {
-
-template
-struct JsonVariantDefault {
- static T get() {
- return T();
- }
-};
-
-template
-struct JsonVariantDefault : JsonVariantDefault {};
-
-template
-struct JsonVariantDefault : JsonVariantDefault {};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantType.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantType.hpp
deleted file mode 100644
index da0e9a2ef..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/JsonVariantType.hpp
+++ /dev/null
@@ -1,39 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-namespace ArduinoJson {
-class JsonArray;
-class JsonObject;
-
-namespace Internals {
-
-// Enumerated type to know the current type of a JsonVariant.
-// The value determines which member of JsonVariantContent is used.
-enum JsonVariantType {
- JSON_UNDEFINED, // JsonVariant has not been initialized
- JSON_UNPARSED, // JsonVariant contains an unparsed string
- JSON_STRING, // JsonVariant stores a const char*
- JSON_BOOLEAN, // JsonVariant stores a bool
- JSON_POSITIVE_INTEGER, // JsonVariant stores an unsigned long
- JSON_NEGATIVE_INTEGER, // JsonVariant stores an unsigned long that must be
- // negated
- JSON_ARRAY, // JsonVariant stores a pointer to a JsonArray
- JSON_OBJECT, // JsonVariant stores a pointer to a JsonObject
-
- // The following values are reserved for float values
- // Multiple values are used for double, depending on the number of decimal
- // digits that must be printed in the JSON output.
- // This little trick allow to save one extra member in JsonVariant
- JSON_FLOAT_0_DECIMALS
- // JSON_FLOAT_1_DECIMAL
- // JSON_FLOAT_2_DECIMALS
- // ...
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/List.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/List.hpp
deleted file mode 100644
index e405635a8..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/List.hpp
+++ /dev/null
@@ -1,94 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../JsonBuffer.hpp"
-#include "ListConstIterator.hpp"
-#include "ListIterator.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-// A singly linked list of T.
-// The linked list is composed of ListNode.
-// It is derived by JsonArray and JsonObject
-template
-class List {
- public:
- typedef T value_type;
- typedef ListNode node_type;
- typedef ListIterator iterator;
- typedef ListConstIterator const_iterator;
-
- // Creates an empty List attached to a JsonBuffer.
- // The JsonBuffer allows to allocate new nodes.
- // When buffer is NULL, the List is not able to grow and success() returns
- // false. This is used to identify bad memory allocations and parsing
- // failures.
- explicit List(JsonBuffer *buffer) : _buffer(buffer), _firstNode(NULL) {}
-
- // Returns true if the object is valid
- // Would return false in the following situation:
- // - the memory allocation failed (StaticJsonBuffer was too small)
- // - the JSON parsing failed
- bool success() const {
- return _buffer != NULL;
- }
-
- // Returns the numbers of elements in the list.
- // For a JsonObject, it would return the number of key-value pairs
- size_t size() const {
- size_t nodeCount = 0;
- for (node_type *node = _firstNode; node; node = node->next) nodeCount++;
- return nodeCount;
- }
-
- iterator begin() {
- return iterator(_firstNode);
- }
- iterator end() {
- return iterator(NULL);
- }
-
- const_iterator begin() const {
- return const_iterator(_firstNode);
- }
- const_iterator end() const {
- return const_iterator(NULL);
- }
-
- protected:
- node_type *addNewNode() {
- node_type *newNode = new (_buffer) node_type();
-
- if (_firstNode) {
- node_type *lastNode = _firstNode;
- while (lastNode->next) lastNode = lastNode->next;
- lastNode->next = newNode;
- } else {
- _firstNode = newNode;
- }
-
- return newNode;
- }
-
- void removeNode(node_type *nodeToRemove) {
- if (!nodeToRemove) return;
- if (nodeToRemove == _firstNode) {
- _firstNode = nodeToRemove->next;
- } else {
- for (node_type *node = _firstNode; node; node = node->next)
- if (node->next == nodeToRemove) node->next = nodeToRemove->next;
- }
- }
-
- JsonBuffer *_buffer;
- node_type *_firstNode;
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListConstIterator.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListConstIterator.hpp
deleted file mode 100644
index 1707fe851..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListConstIterator.hpp
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "ListNode.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-// A read-only forward itertor for List
-template
-class ListConstIterator {
- public:
- explicit ListConstIterator(const ListNode *node = NULL) : _node(node) {}
-
- const T &operator*() const {
- return _node->content;
- }
- const T *operator->() {
- return &_node->content;
- }
-
- bool operator==(const ListConstIterator &other) const {
- return _node == other._node;
- }
-
- bool operator!=(const ListConstIterator &other) const {
- return _node != other._node;
- }
-
- ListConstIterator &operator++() {
- if (_node) _node = _node->next;
- return *this;
- }
-
- private:
- const ListNode *_node;
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListIterator.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListIterator.hpp
deleted file mode 100644
index 6604f5dd7..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListIterator.hpp
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "ListConstIterator.hpp"
-#include "ListNode.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-// A read-write forward iterator for List
-template
-class ListIterator {
- public:
- explicit ListIterator(ListNode *node = NULL) : _node(node) {}
-
- T &operator*() const {
- return _node->content;
- }
- T *operator->() {
- return &_node->content;
- }
-
- bool operator==(const ListIterator &other) const {
- return _node == other._node;
- }
-
- bool operator!=(const ListIterator &other) const {
- return _node != other._node;
- }
-
- ListIterator &operator++() {
- if (_node) _node = _node->next;
- return *this;
- }
-
- operator ListConstIterator() const {
- return ListConstIterator(_node);
- }
-
- private:
- ListNode *_node;
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListNode.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListNode.hpp
deleted file mode 100644
index d3b65ae94..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ListNode.hpp
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include // for NULL
-
-#include "JsonBufferAllocated.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-// A node for a singly-linked list.
-// Used by List and its iterators.
-template
-struct ListNode : public Internals::JsonBufferAllocated {
- ListNode() : next(NULL) {}
-
- ListNode *next;
- T content;
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/Parse.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/Parse.hpp
deleted file mode 100644
index 879f3d2fe..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/Parse.hpp
+++ /dev/null
@@ -1,66 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include
-
-namespace ArduinoJson {
-namespace Internals {
-template
-TFloat parse(const char *);
-
-template <>
-inline float parse(const char *s) {
- return static_cast(strtod(s, NULL));
-}
-
-template <>
-inline double parse(const char *s) {
- return strtod(s, NULL);
-}
-
-template <>
-inline long parse(const char *s) {
- return strtol(s, NULL, 10);
-}
-
-template <>
-inline unsigned long parse(const char *s) {
- return strtoul(s, NULL, 10);
-}
-
-template <>
-inline int parse(const char *s) {
- return atoi(s);
-}
-
-#if ARDUINOJSON_USE_LONG_LONG
-template <>
-inline long long parse(const char *s) {
- return strtoll(s, NULL, 10);
-}
-
-template <>
-inline unsigned long long parse(const char *s) {
- return strtoull(s, NULL, 10);
-}
-#endif
-
-#if ARDUINOJSON_USE_INT64
-template <>
-inline __int64 parse<__int64>(const char *s) {
- return _strtoi64(s, NULL, 10);
-}
-
-template <>
-inline unsigned __int64 parse(const char *s) {
- return _strtoui64(s, NULL, 10);
-}
-#endif
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ReferenceType.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ReferenceType.hpp
deleted file mode 100644
index 9ffbbd9bd..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ReferenceType.hpp
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-namespace ArduinoJson {
-namespace Internals {
-
-// A type that is meant to be used by reference only (JsonArray and JsonObject)
-class ReferenceType {
- public:
- bool operator==(const ReferenceType& other) const {
- // two JsonArray are equal if they are the same instance
- // (we don't compare the content)
- return this == &other;
- }
-
- bool operator!=(const ReferenceType& other) const {
- return this != &other;
- }
-
- protected:
- ReferenceType() {}
-
- private:
- // copy constructor is private
- ReferenceType(const ReferenceType&);
-
- // copy operator is private
- ReferenceType& operator=(const ReferenceType&);
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ValueSetter.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ValueSetter.hpp
deleted file mode 100644
index 81be5839f..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Data/ValueSetter.hpp
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../JsonBuffer.hpp"
-#include "../JsonVariant.hpp"
-#include "../StringTraits/StringTraits.hpp"
-#include "../TypeTraits/EnableIf.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-template
-struct ValueSetter {
- template
- static bool set(JsonBuffer*, TDestination& destination,
- const TSource& source) {
- destination = source;
- return true;
- }
-};
-
-template
-struct ValueSetter::should_duplicate>::type> {
- template
- static bool set(JsonBuffer* buffer, TDestination& destination,
- const TSource& source) {
- const char* copy = buffer->strdup(source);
- if (!copy) return false;
- destination = copy;
- return true;
- }
-};
-
-template
-struct ValueSetter::should_duplicate>::type> {
- template
- static bool set(JsonBuffer*, TDestination& destination,
- const TSource& source) {
- // unsigned char* -> char*
- destination = reinterpret_cast(source);
- return true;
- }
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/Comments.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/Comments.hpp
deleted file mode 100644
index 10e8d1164..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/Comments.hpp
+++ /dev/null
@@ -1,64 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-namespace ArduinoJson {
-namespace Internals {
-template
-void skipSpacesAndComments(TInput& input) {
- for (;;) {
- switch (input.current()) {
- // spaces
- case ' ':
- case '\t':
- case '\r':
- case '\n':
- input.move();
- continue;
-
- // comments
- case '/':
- switch (input.next()) {
- // C-style block comment
- case '*':
- input.move(); // skip '/'
- // no need to skip '*'
- for (;;) {
- input.move();
- if (input.current() == '\0') return;
- if (input.current() == '*' && input.next() == '/') {
- input.move(); // skip '*'
- input.move(); // skip '/'
- break;
- }
- }
- break;
-
- // C++-style line comment
- case '/':
- // not need to skip "//"
- for (;;) {
- input.move();
- if (input.current() == '\0') return;
- if (input.current() == '\n') break;
- }
- break;
-
- // not a comment, just a '/'
- default:
- return;
- }
- break;
-
- default:
- return;
- }
- }
-}
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/JsonParser.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/JsonParser.hpp
deleted file mode 100644
index 5448bfc3f..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/JsonParser.hpp
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../JsonBuffer.hpp"
-#include "../JsonVariant.hpp"
-#include "../TypeTraits/IsConst.hpp"
-#include "StringWriter.hpp"
-
-namespace ArduinoJson {
-namespace Internals {
-
-// Parse JSON string to create JsonArrays and JsonObjects
-// This internal class is not indended to be used directly.
-// Instead, use JsonBuffer.parseArray() or .parseObject()
-template
-class JsonParser {
- public:
- JsonParser(JsonBuffer *buffer, TReader reader, TWriter writer,
- uint8_t nestingLimit)
- : _buffer(buffer),
- _reader(reader),
- _writer(writer),
- _nestingLimit(nestingLimit) {}
-
- JsonArray &parseArray();
- JsonObject &parseObject();
-
- JsonVariant parseVariant() {
- JsonVariant result;
- parseAnythingTo(&result);
- return result;
- }
-
- private:
- JsonParser &operator=(const JsonParser &); // non-copiable
-
- static bool eat(TReader &, char charToSkip);
- FORCE_INLINE bool eat(char charToSkip) {
- return eat(_reader, charToSkip);
- }
-
- const char *parseString();
- bool parseAnythingTo(JsonVariant *destination);
- FORCE_INLINE bool parseAnythingToUnsafe(JsonVariant *destination);
-
- inline bool parseArrayTo(JsonVariant *destination);
- inline bool parseObjectTo(JsonVariant *destination);
- inline bool parseStringTo(JsonVariant *destination);
-
- static inline bool isInRange(char c, char min, char max) {
- return min <= c && c <= max;
- }
-
- static inline bool isLetterOrNumber(char c) {
- return isInRange(c, '0', '9') || isInRange(c, 'a', 'z') ||
- isInRange(c, 'A', 'Z') || c == '+' || c == '-' || c == '.';
- }
-
- static inline bool isQuote(char c) {
- return c == '\'' || c == '\"';
- }
-
- JsonBuffer *_buffer;
- TReader _reader;
- TWriter _writer;
- uint8_t _nestingLimit;
-};
-
-template
-struct JsonParserBuilder {
- typedef typename Internals::StringTraits::Reader InputReader;
- typedef JsonParser TParser;
-
- static TParser makeParser(TJsonBuffer *buffer, TString &json,
- uint8_t nestingLimit) {
- return TParser(buffer, InputReader(json), *buffer, nestingLimit);
- }
-};
-
-template
-struct JsonParserBuilder<
- TJsonBuffer, TChar *,
- typename TypeTraits::EnableIf::value>::type> {
- typedef typename Internals::StringTraits::Reader TReader;
- typedef StringWriter TWriter;
- typedef JsonParser TParser;
-
- static TParser makeParser(TJsonBuffer *buffer, TChar *json,
- uint8_t nestingLimit) {
- return TParser(buffer, TReader(json), TWriter(json), nestingLimit);
- }
-};
-
-template
-inline typename JsonParserBuilder::TParser makeParser(
- TJsonBuffer *buffer, TString &json, uint8_t nestingLimit) {
- return JsonParserBuilder::makeParser(buffer, json,
- nestingLimit);
-}
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/JsonParserImpl.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/JsonParserImpl.hpp
deleted file mode 100644
index f1c7d6152..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/JsonParserImpl.hpp
+++ /dev/null
@@ -1,196 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "Comments.hpp"
-#include "JsonParser.hpp"
-
-template
-inline bool ArduinoJson::Internals::JsonParser::eat(
- TReader &reader, char charToSkip) {
- skipSpacesAndComments(reader);
- if (reader.current() != charToSkip) return false;
- reader.move();
- return true;
-}
-
-template
-inline bool
-ArduinoJson::Internals::JsonParser::parseAnythingTo(
- JsonVariant *destination) {
- if (_nestingLimit == 0) return false;
- _nestingLimit--;
- bool success = parseAnythingToUnsafe(destination);
- _nestingLimit++;
- return success;
-}
-
-template
-inline bool
-ArduinoJson::Internals::JsonParser::parseAnythingToUnsafe(
- JsonVariant *destination) {
- skipSpacesAndComments(_reader);
-
- switch (_reader.current()) {
- case '[':
- return parseArrayTo(destination);
-
- case '{':
- return parseObjectTo(destination);
-
- default:
- return parseStringTo(destination);
- }
-}
-
-template
-inline ArduinoJson::JsonArray &
-ArduinoJson::Internals::JsonParser::parseArray() {
- // Create an empty array
- JsonArray &array = _buffer->createArray();
-
- // Check opening braket
- if (!eat('[')) goto ERROR_MISSING_BRACKET;
- if (eat(']')) goto SUCCESS_EMPTY_ARRAY;
-
- // Read each value
- for (;;) {
- // 1 - Parse value
- JsonVariant value;
- if (!parseAnythingTo(&value)) goto ERROR_INVALID_VALUE;
- if (!array.add(value)) goto ERROR_NO_MEMORY;
-
- // 2 - More values?
- if (eat(']')) goto SUCCES_NON_EMPTY_ARRAY;
- if (!eat(',')) goto ERROR_MISSING_COMMA;
- }
-
-SUCCESS_EMPTY_ARRAY:
-SUCCES_NON_EMPTY_ARRAY:
- return array;
-
-ERROR_INVALID_VALUE:
-ERROR_MISSING_BRACKET:
-ERROR_MISSING_COMMA:
-ERROR_NO_MEMORY:
- return JsonArray::invalid();
-}
-
-template
-inline bool ArduinoJson::Internals::JsonParser::parseArrayTo(
- JsonVariant *destination) {
- JsonArray &array = parseArray();
- if (!array.success()) return false;
-
- *destination = array;
- return true;
-}
-
-template
-inline ArduinoJson::JsonObject &
-ArduinoJson::Internals::JsonParser::parseObject() {
- // Create an empty object
- JsonObject &object = _buffer->createObject();
-
- // Check opening brace
- if (!eat('{')) goto ERROR_MISSING_BRACE;
- if (eat('}')) goto SUCCESS_EMPTY_OBJECT;
-
- // Read each key value pair
- for (;;) {
- // 1 - Parse key
- const char *key = parseString();
- if (!key) goto ERROR_INVALID_KEY;
- if (!eat(':')) goto ERROR_MISSING_COLON;
-
- // 2 - Parse value
- JsonVariant value;
- if (!parseAnythingTo(&value)) goto ERROR_INVALID_VALUE;
- if (!object.set(key, value)) goto ERROR_NO_MEMORY;
-
- // 3 - More keys/values?
- if (eat('}')) goto SUCCESS_NON_EMPTY_OBJECT;
- if (!eat(',')) goto ERROR_MISSING_COMMA;
- }
-
-SUCCESS_EMPTY_OBJECT:
-SUCCESS_NON_EMPTY_OBJECT:
- return object;
-
-ERROR_INVALID_KEY:
-ERROR_INVALID_VALUE:
-ERROR_MISSING_BRACE:
-ERROR_MISSING_COLON:
-ERROR_MISSING_COMMA:
-ERROR_NO_MEMORY:
- return JsonObject::invalid();
-}
-
-template
-inline bool ArduinoJson::Internals::JsonParser::parseObjectTo(
- JsonVariant *destination) {
- JsonObject &object = parseObject();
- if (!object.success()) return false;
-
- *destination = object;
- return true;
-}
-
-template
-inline const char *
-ArduinoJson::Internals::JsonParser::parseString() {
- typename TypeTraits::RemoveReference::type::String str =
- _writer.startString();
-
- skipSpacesAndComments(_reader);
- char c = _reader.current();
-
- if (isQuote(c)) { // quotes
- _reader.move();
- char stopChar = c;
- for (;;) {
- c = _reader.current();
- if (c == '\0') break;
- _reader.move();
-
- if (c == stopChar) break;
-
- if (c == '\\') {
- // replace char
- c = Encoding::unescapeChar(_reader.current());
- if (c == '\0') break;
- _reader.move();
- }
-
- str.append(c);
- }
- } else { // no quotes
- for (;;) {
- if (!isLetterOrNumber(c)) break;
- _reader.move();
- str.append(c);
- c = _reader.current();
- }
- }
-
- return str.c_str();
-}
-
-template
-inline bool ArduinoJson::Internals::JsonParser::parseStringTo(
- JsonVariant *destination) {
- bool hasQuotes = isQuote(_reader.current());
- const char *value = parseString();
- if (value == NULL) return false;
- if (hasQuotes) {
- *destination = value;
- } else {
- *destination = RawJson(value);
- }
- return true;
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/StringWriter.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/StringWriter.hpp
deleted file mode 100644
index 7ebfabaa6..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/Deserialization/StringWriter.hpp
+++ /dev/null
@@ -1,44 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-namespace ArduinoJson {
-namespace Internals {
-
-template
-class StringWriter {
- public:
- class String {
- public:
- String(TChar** ptr) : _writePtr(ptr), _startPtr(*ptr) {}
-
- void append(TChar c) {
- *(*_writePtr)++ = c;
- }
-
- const char* c_str() const {
- *(*_writePtr)++ = 0;
- return reinterpret_cast(_startPtr);
- }
-
- private:
- TChar** _writePtr;
- TChar* _startPtr;
- };
-
- StringWriter(TChar* buffer) : _ptr(buffer) {}
-
- String startString() {
- return String(&_ptr);
- }
-
- private:
- TChar* _ptr;
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/DynamicJsonBuffer.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/DynamicJsonBuffer.hpp
deleted file mode 100644
index 64de7f03c..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/DynamicJsonBuffer.hpp
+++ /dev/null
@@ -1,159 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "JsonBufferBase.hpp"
-
-#include
-
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
-#elif defined(__GNUC__)
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-#pragma GCC diagnostic push
-#endif
-#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
-#endif
-
-namespace ArduinoJson {
-class DefaultAllocator {
- public:
- void* allocate(size_t size) {
- return malloc(size);
- }
- void deallocate(void* pointer) {
- free(pointer);
- }
-};
-
-template
-class DynamicJsonBufferBase
- : public JsonBufferBase > {
- struct Block;
- struct EmptyBlock {
- Block* next;
- size_t capacity;
- size_t size;
- };
- struct Block : EmptyBlock {
- uint8_t data[1];
- };
-
- public:
- DynamicJsonBufferBase(size_t initialSize = 256)
- : _head(NULL), _nextBlockCapacity(initialSize) {}
-
- ~DynamicJsonBufferBase() {
- Block* currentBlock = _head;
-
- while (currentBlock != NULL) {
- Block* nextBlock = currentBlock->next;
- _allocator.deallocate(currentBlock);
- currentBlock = nextBlock;
- }
- }
-
- size_t size() const {
- size_t total = 0;
- for (const Block* b = _head; b; b = b->next) total += b->size;
- return total;
- }
-
- virtual void* alloc(size_t bytes) {
- alignNextAlloc();
- return canAllocInHead(bytes) ? allocInHead(bytes) : allocInNewBlock(bytes);
- }
-
- class String {
- public:
- String(DynamicJsonBufferBase* parent)
- : _parent(parent), _start(NULL), _length(0) {}
-
- void append(char c) {
- if (_parent->canAllocInHead(1)) {
- char* end = static_cast(_parent->allocInHead(1));
- *end = c;
- if (_length == 0) _start = end;
- } else {
- char* newStart =
- static_cast(_parent->allocInNewBlock(_length + 1));
- if (_start && newStart) memcpy(newStart, _start, _length);
- if (newStart) newStart[_length] = c;
- _start = newStart;
- }
- _length++;
- }
-
- const char* c_str() {
- append(0);
- return _start;
- }
-
- private:
- DynamicJsonBufferBase* _parent;
- char* _start;
- int _length;
- };
-
- String startString() {
- return String(this);
- }
-
- private:
- void alignNextAlloc() {
- if (_head) _head->size = this->round_size_up(_head->size);
- }
-
- bool canAllocInHead(size_t bytes) const {
- return _head != NULL && _head->size + bytes <= _head->capacity;
- }
-
- void* allocInHead(size_t bytes) {
- void* p = _head->data + _head->size;
- _head->size += bytes;
- return p;
- }
-
- void* allocInNewBlock(size_t bytes) {
- size_t capacity = _nextBlockCapacity;
- if (bytes > capacity) capacity = bytes;
- if (!addNewBlock(capacity)) return NULL;
- _nextBlockCapacity *= 2;
- return allocInHead(bytes);
- }
-
- bool addNewBlock(size_t capacity) {
- size_t bytes = sizeof(EmptyBlock) + capacity;
- Block* block = static_cast(_allocator.allocate(bytes));
- if (block == NULL) return false;
- block->capacity = capacity;
- block->size = 0;
- block->next = _head;
- _head = block;
- return true;
- }
-
- TAllocator _allocator;
- Block* _head;
- size_t _nextBlockCapacity;
-};
-
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#elif defined(__GNUC__)
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-#pragma GCC diagnostic pop
-#endif
-#endif
-
-// Implements a JsonBuffer with dynamic memory allocation.
-// You are strongly encouraged to consider using StaticJsonBuffer which is much
-// more suitable for embedded systems.
-typedef DynamicJsonBufferBase DynamicJsonBuffer;
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArray.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArray.hpp
deleted file mode 100644
index 413653512..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArray.hpp
+++ /dev/null
@@ -1,234 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "Data/JsonBufferAllocated.hpp"
-#include "Data/List.hpp"
-#include "Data/ReferenceType.hpp"
-#include "Data/ValueSetter.hpp"
-#include "JsonVariant.hpp"
-#include "Serialization/JsonPrintable.hpp"
-#include "StringTraits/StringTraits.hpp"
-#include "TypeTraits/EnableIf.hpp"
-#include "TypeTraits/IsArray.hpp"
-#include "TypeTraits/IsFloatingPoint.hpp"
-#include "TypeTraits/IsSame.hpp"
-
-// Returns the size (in bytes) of an array with n elements.
-// Can be very handy to determine the size of a StaticJsonBuffer.
-#define JSON_ARRAY_SIZE(NUMBER_OF_ELEMENTS) \
- (sizeof(JsonArray) + (NUMBER_OF_ELEMENTS) * sizeof(JsonArray::node_type))
-
-namespace ArduinoJson {
-
-// Forward declarations
-class JsonObject;
-class JsonBuffer;
-class JsonArraySubscript;
-
-// An array of JsonVariant.
-//
-// The constructor is private, instances must be created via
-// JsonBuffer::createArray() or JsonBuffer::parseArray().
-// A JsonArray can be serialized to a JSON string via JsonArray::printTo().
-// It can also be deserialized from a JSON string via JsonBuffer::parseArray().
-class JsonArray : public Internals::JsonPrintable,
- public Internals::ReferenceType,
- public Internals::List,
- public Internals::JsonBufferAllocated {
- public:
- // Create an empty JsonArray attached to the specified JsonBuffer.
- // You should not call this constructor directly.
- // Instead, use JsonBuffer::createArray() or JsonBuffer::parseArray().
- explicit JsonArray(JsonBuffer *buffer)
- : Internals::List(buffer) {}
-
- // Gets the value at the specified index
- const JsonArraySubscript operator[](size_t index) const;
-
- // Gets or sets the value at specified index
- JsonArraySubscript operator[](size_t index);
-
- // Adds the specified value at the end of the array.
- //
- // bool add(TValue);
- // TValue = bool, long, int, short, float, double, RawJson, JsonVariant,
- // const std::string&, const String&,
- // const JsonArray&, const JsonObject&
- template
- typename TypeTraits::EnableIf::value, bool>::type add(
- const T &value) {
- return add_impl(value);
- }
- //
- // bool add(TValue);
- // TValue = const char*, const char[N], const FlashStringHelper*
- template
- bool add(const T *value) {
- return add_impl(value);
- }
- //
- // bool add(TValue value, uint8_t decimals);
- // TValue = float, double
- template
- bool add(T value, uint8_t decimals) {
- return add_impl(JsonVariant(value, decimals));
- }
-
- // Sets the value at specified index.
- //
- // bool add(size_t index, TValue);
- // TValue = bool, long, int, short, float, double, RawJson, JsonVariant,
- // const std::string&, const String&,
- // const JsonArray&, const JsonObject&
- template
- typename TypeTraits::EnableIf::value, bool>::type set(
- size_t index, const T &value) {
- return set_impl(index, value);
- }
- //
- // bool add(size_t index, TValue);
- // TValue = const char*, const char[N], const FlashStringHelper*
- template
- bool set(size_t index, const T *value) {
- return set_impl(index, value);
- }
- //
- // bool set(size_t index, TValue value, uint8_t decimals);
- // TValue = float, double
- template
- typename TypeTraits::EnableIf::value,
- bool>::type
- set(size_t index, T value, uint8_t decimals) {
- return set_impl(index, JsonVariant(value, decimals));
- }
-
- // Gets the value at the specified index.
- template
- typename Internals::JsonVariantAs::type get(size_t index) const {
- node_type *node = findNode(index);
- return node ? node->content.as()
- : Internals::JsonVariantDefault::get();
- }
-
- // Check the type of the value at specified index.
- template
- bool is(size_t index) const {
- node_type *node = findNode(index);
- return node ? node->content.is() : false;
- }
-
- // Creates a JsonArray and adds a reference at the end of the array.
- // It's a shortcut for JsonBuffer::createArray() and JsonArray::add()
- JsonArray &createNestedArray();
-
- // Creates a JsonObject and adds a reference at the end of the array.
- // It's a shortcut for JsonBuffer::createObject() and JsonArray::add()
- JsonObject &createNestedObject();
-
- // Removes element at specified index.
- void removeAt(size_t index) {
- removeNode(findNode(index));
- }
-
- // Returns a reference an invalid JsonArray.
- // This object is meant to replace a NULL pointer.
- // This is used when memory allocation or JSON parsing fail.
- static JsonArray &invalid() {
- static JsonArray instance(NULL);
- return instance;
- }
-
- // Imports a 1D array
- template
- bool copyFrom(T (&array)[N]) {
- return copyFrom(array, N);
- }
-
- // Imports a 1D array
- template
- bool copyFrom(T *array, size_t len) {
- bool ok = true;
- for (size_t i = 0; i < len; i++) {
- ok &= add(array[i]);
- }
- return ok;
- }
-
- // Imports a 2D array
- template
- bool copyFrom(T (&array)[N1][N2]) {
- bool ok = true;
- for (size_t i = 0; i < N1; i++) {
- JsonArray &nestedArray = createNestedArray();
- for (size_t j = 0; j < N2; j++) {
- ok &= nestedArray.add(array[i][j]);
- }
- }
- return ok;
- }
-
- // Exports a 1D array
- template
- size_t copyTo(T (&array)[N]) const {
- return copyTo(array, N);
- }
-
- // Exports a 1D array
- template
- size_t copyTo(T *array, size_t len) const {
- size_t i = 0;
- for (const_iterator it = begin(); it != end() && i < len; ++it)
- array[i++] = *it;
- return i;
- }
-
- // Exports a 2D array
- template
- void copyTo(T (&array)[N1][N2]) const {
- size_t i = 0;
- for (const_iterator it = begin(); it != end() && i < N1; ++it) {
- it->as().copyTo(array[i++]);
- }
- }
-
- private:
- node_type *findNode(size_t index) const {
- node_type *node = _firstNode;
- while (node && index--) node = node->next;
- return node;
- }
-
- template
- bool set_impl(size_t index, TValueRef value) {
- node_type *node = findNode(index);
- if (!node) return false;
-
- return Internals::ValueSetter::set(_buffer, node->content,
- value);
- }
-
- template
- bool add_impl(TValueRef value) {
- node_type *node = addNewNode();
- if (!node) return false;
-
- return Internals::ValueSetter::set(_buffer, node->content,
- value);
- }
-};
-
-namespace Internals {
-template <>
-struct JsonVariantDefault {
- static JsonArray &get() {
- return JsonArray::invalid();
- }
-};
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArrayImpl.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArrayImpl.hpp
deleted file mode 100644
index d065d1d03..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArrayImpl.hpp
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "JsonArray.hpp"
-#include "JsonArraySubscript.hpp"
-#include "JsonObject.hpp"
-
-namespace ArduinoJson {
-
-inline JsonArray &JsonArray::createNestedArray() {
- if (!_buffer) return JsonArray::invalid();
- JsonArray &array = _buffer->createArray();
- add(array);
- return array;
-}
-
-inline JsonObject &JsonArray::createNestedObject() {
- if (!_buffer) return JsonObject::invalid();
- JsonObject &object = _buffer->createObject();
- add(object);
- return object;
-}
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArraySubscript.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArraySubscript.hpp
deleted file mode 100644
index 1deda0750..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonArraySubscript.hpp
+++ /dev/null
@@ -1,123 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "Configuration.hpp"
-#include "JsonVariantBase.hpp"
-
-#ifdef _MSC_VER
-#pragma warning(push)
-#pragma warning(disable : 4522)
-#endif
-
-namespace ArduinoJson {
-class JsonArraySubscript : public JsonVariantBase {
- public:
- FORCE_INLINE JsonArraySubscript(JsonArray& array, size_t index)
- : _array(array), _index(index) {}
-
- FORCE_INLINE JsonArraySubscript& operator=(const JsonArraySubscript& src) {
- _array.set(_index, src);
- return *this;
- }
-
- // Replaces the value
- //
- // operator=(TValue)
- // TValue = bool, long, int, short, float, double, RawJson, JsonVariant,
- // const std::string&, const String&,
- // const JsonArray&, const JsonObject&
- template
- FORCE_INLINE JsonArraySubscript& operator=(const T& src) {
- _array.set(_index, src);
- return *this;
- }
- //
- // operator=(TValue)
- // TValue = const char*, const char[N], const FlashStringHelper*
- template
- FORCE_INLINE JsonArraySubscript& operator=(const T* src) {
- _array.set(_index, src);
- return *this;
- }
-
- FORCE_INLINE bool success() const {
- return _index < _array.size();
- }
-
- template
- FORCE_INLINE typename Internals::JsonVariantAs::type as() const {
- return _array.get(_index);
- }
-
- template
- FORCE_INLINE bool is() const {
- return _array.is(_index);
- }
-
- // Replaces the value
- //
- // bool set(TValue)
- // TValue = bool, long, int, short, float, double, RawJson, JsonVariant,
- // const std::string&, const String&,
- // const JsonArray&, const JsonObject&
- template
- FORCE_INLINE bool set(const TValue& value) {
- return _array.set(_index, value);
- }
- //
- // bool set(TValue)
- // TValue = const char*, const char[N], const FlashStringHelper*
- template
- FORCE_INLINE bool set(const TValue* value) {
- return _array.set(_index, value);
- }
- //
- // bool set(TValue, uint8_t decimals);
- // TValue = float, double
- template
- FORCE_INLINE bool set(const TValue& value, uint8_t decimals) {
- return _array.set(_index, value, decimals);
- }
-
- private:
- JsonArray& _array;
- const size_t _index;
-};
-
-#if ARDUINOJSON_ENABLE_STD_STREAM
-inline std::ostream& operator<<(std::ostream& os,
- const JsonArraySubscript& source) {
- return source.printTo(os);
-}
-#endif
-
-inline JsonArraySubscript JsonArray::operator[](size_t index) {
- return JsonArraySubscript(*this, index);
-}
-
-inline const JsonArraySubscript JsonArray::operator[](size_t index) const {
- return JsonArraySubscript(*const_cast(this), index);
-}
-
-template
-inline JsonArraySubscript JsonVariantBase::operator[](int index) {
- return as()[index];
-}
-
-template
-inline const JsonArraySubscript JsonVariantBase::operator[](
- int index) const {
- return as()[index];
-}
-
-} // namespace ArduinoJson
-
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBuffer.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBuffer.hpp
deleted file mode 100644
index 30b18a2eb..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBuffer.hpp
+++ /dev/null
@@ -1,97 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include // for size_t
-#include // for uint8_t
-#include
-
-#include "JsonVariant.hpp"
-#include "TypeTraits/EnableIf.hpp"
-#include "TypeTraits/IsArray.hpp"
-
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
-#elif defined(__GNUC__)
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-#pragma GCC diagnostic push
-#endif
-#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
-#endif
-
-namespace ArduinoJson {
-class JsonArray;
-class JsonObject;
-
-// Entry point for using the library.
-//
-// Handle the memory management (done in derived classes) and calls the parser.
-// This abstract class is implemented by StaticJsonBuffer which implements a
-// fixed memory allocation.
-class JsonBuffer {
- public:
- // CAUTION: NO VIRTUAL DESTRUCTOR!
- // If we add a virtual constructor the Arduino compiler will add malloc() and
- // free() to the binary, adding 706 useless bytes.
- // virtual ~JsonBuffer() {}
-
- // Allocates an empty JsonArray.
- //
- // Returns a reference to the new JsonArray or JsonArray::invalid() if the
- // allocation fails.
- JsonArray &createArray();
-
- // Allocates an empty JsonObject.
- //
- // Returns a reference to the new JsonObject or JsonObject::invalid() if the
- // allocation fails.
- JsonObject &createObject();
-
- // Duplicates a string
- //
- // char* strdup(TValue);
- // TValue = const std::string&, const String&,
- template
- typename TypeTraits::EnableIf::value,
- char *>::type
- strdup(const TString &src) {
- return Internals::StringTraits::duplicate(src, this);
- }
- //
- // char* strdup(TValue);
- // TValue = const char*, const char[N], const FlashStringHelper*
- template
- char *strdup(const TString *src) {
- return Internals::StringTraits::duplicate(src, this);
- }
-
- // Allocates n bytes in the JsonBuffer.
- // Return a pointer to the allocated memory or NULL if allocation fails.
- virtual void *alloc(size_t size) = 0;
-
- protected:
- // Preserve aligment if necessary
- static FORCE_INLINE size_t round_size_up(size_t bytes) {
-#if ARDUINOJSON_ENABLE_ALIGNMENT
- const size_t x = sizeof(void *) - 1;
- return (bytes + x) & ~x;
-#else
- return bytes;
-#endif
- }
-};
-}
-
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#elif defined(__GNUC__)
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-#pragma GCC diagnostic pop
-#endif
-#endif
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBufferBase.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBufferBase.hpp
deleted file mode 100644
index 7c3937190..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBufferBase.hpp
+++ /dev/null
@@ -1,143 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "Deserialization/JsonParser.hpp"
-
-#if defined(__clang__)
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wnon-virtual-dtor"
-#elif defined(__GNUC__)
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-#pragma GCC diagnostic push
-#endif
-#pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
-#endif
-
-namespace ArduinoJson {
-template
-class JsonBufferBase : public JsonBuffer {
- public:
- // Allocates and populate a JsonArray from a JSON string.
- //
- // The First argument is a pointer to the JSON string, the memory must be
- // writable
- // because the parser will insert null-terminators and replace escaped chars.
- //
- // The second argument set the nesting limit
- //
- // Returns a reference to the new JsonObject or JsonObject::invalid() if the
- // allocation fails.
- // With this overload, the JsonBuffer will make a copy of the string
- //
- // JsonArray& parseArray(TString);
- // TString = const std::string&, const String&
- template
- typename TypeTraits::EnableIf::value,
- JsonArray &>::type
- parseArray(const TString &json,
- uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseArray();
- }
- //
- // JsonArray& parseArray(TString);
- // TString = const char*, const char[N], const FlashStringHelper*
- template
- JsonArray &parseArray(
- TString *json, uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseArray();
- }
- //
- // JsonArray& parseArray(TString);
- // TString = std::istream&, Stream&
- template
- JsonArray &parseArray(
- TString &json, uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseArray();
- }
-
- // Allocates and populate a JsonObject from a JSON string.
- //
- // The First argument is a pointer to the JSON string, the memory must be
- // writable
- // because the parser will insert null-terminators and replace escaped chars.
- //
- // The second argument set the nesting limit
- //
- // Returns a reference to the new JsonObject or JsonObject::invalid() if the
- // allocation fails.
- //
- // JsonObject& parseObject(TString);
- // TString = const std::string&, const String&
- template
- typename TypeTraits::EnableIf::value,
- JsonObject &>::type
- parseObject(const TString &json,
- uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseObject();
- }
- //
- // JsonObject& parseObject(TString);
- // TString = const char*, const char[N], const FlashStringHelper*
- template
- JsonObject &parseObject(
- TString *json, uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseObject();
- }
- //
- // JsonObject& parseObject(TString);
- // TString = std::istream&, Stream&
- template
- JsonObject &parseObject(
- TString &json, uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseObject();
- }
-
- // Generalized version of parseArray() and parseObject(), also works for
- // integral types.
- //
- // JsonVariant parse(TString);
- // TString = const std::string&, const String&
- template
- typename TypeTraits::EnableIf::value,
- JsonVariant>::type
- parse(const TString &json,
- uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseVariant();
- }
- //
- // JsonVariant parse(TString);
- // TString = const char*, const char[N], const FlashStringHelper*
- template
- JsonVariant parse(TString *json,
- uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseVariant();
- }
- //
- // JsonVariant parse(TString);
- // TString = std::istream&, Stream&
- template
- JsonVariant parse(TString &json,
- uint8_t nestingLimit = ARDUINOJSON_DEFAULT_NESTING_LIMIT) {
- return Internals::makeParser(that(), json, nestingLimit).parseVariant();
- }
-
- private:
- TDerived *that() {
- return static_cast(this);
- }
-};
-}
-
-#if defined(__clang__)
-#pragma clang diagnostic pop
-#elif defined(__GNUC__)
-#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
-#pragma GCC diagnostic pop
-#endif
-#endif
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBufferImpl.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBufferImpl.hpp
deleted file mode 100644
index fab8eeff8..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonBufferImpl.hpp
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#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();
-}
diff --git a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonObject.hpp b/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonObject.hpp
deleted file mode 100644
index 0a4c80aac..000000000
--- a/lib-before-5.9.1f/ArduinoJson/include/ArduinoJson/JsonObject.hpp
+++ /dev/null
@@ -1,341 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://github.com/bblanchon/ArduinoJson
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "Data/JsonBufferAllocated.hpp"
-#include "Data/List.hpp"
-#include "Data/ReferenceType.hpp"
-#include "Data/ValueSetter.hpp"
-#include "JsonPair.hpp"
-#include "Serialization/JsonPrintable.hpp"
-#include "StringTraits/StringTraits.hpp"
-#include "TypeTraits/EnableIf.hpp"
-#include "TypeTraits/IsArray.hpp"
-#include "TypeTraits/IsFloatingPoint.hpp"
-#include "TypeTraits/IsSame.hpp"
-
-// Returns the size (in bytes) of an object with n elements.
-// Can be very handy to determine the size of a StaticJsonBuffer.
-#define JSON_OBJECT_SIZE(NUMBER_OF_ELEMENTS) \
- (sizeof(JsonObject) + (NUMBER_OF_ELEMENTS) * sizeof(JsonObject::node_type))
-
-namespace ArduinoJson {
-
-// Forward declarations
-class JsonArray;
-class JsonBuffer;
-
-// A dictionary of JsonVariant indexed by string (char*)
-//
-// The constructor is private, instances must be created via
-// JsonBuffer::createObject() or JsonBuffer::parseObject().
-// A JsonObject can be serialized to a JSON string via JsonObject::printTo().
-// It can also be deserialized from a JSON string via JsonBuffer::parseObject().
-class JsonObject : public Internals::JsonPrintable,
- public Internals::ReferenceType,
- public Internals::List,
- public Internals::JsonBufferAllocated {
- public:
- // Create an empty JsonArray attached to the specified JsonBuffer.
- // You should not use this constructor directly.
- // Instead, use JsonBuffer::createObject() or JsonBuffer.parseObject().
- explicit JsonObject(JsonBuffer* buffer) : Internals::List(buffer) {}
-
- // Gets or sets the value associated with the specified key.
- //
- // JsonObjectSubscript operator[](TKey)
- // TKey = const std::string&, const String&
- template
- typename TypeTraits::EnableIf::value,
- JsonObjectSubscript >::type
- operator[](const TString& key) {
- return JsonObjectSubscript(*this, key);
- }
- //
- // JsonObjectSubscript operator[](TKey)
- // TKey = const char*, const char[N], const FlashStringHelper*
- template
- JsonObjectSubscript operator[](const TString* key) {
- return JsonObjectSubscript