From fa5711eaaa79ec47a1981c8b1ecfbd3321e3ce0b Mon Sep 17 00:00:00 2001
From: Theo Arends <11044339+arendst@users.noreply.github.com>
Date: Wed, 9 Jan 2019 15:32:43 +0100
Subject: [PATCH] Update ArduinoJson to 5.13.4
Update ArduinoJson to 5.13.4
---
lib/ArduinoJson-5.11.2/ArduinoJson.h | 8 -
lib/ArduinoJson-5.11.2/README.md | 130 -------
.../JsonHttpClient/JsonHttpClient.ino | 184 ----------
.../examples/JsonServer/JsonServer.ino | 76 -----
.../examples/JsonUdpBeacon/JsonUdpBeacon.ino | 57 ----
lib/ArduinoJson-5.11.2/library.properties | 9 -
lib/ArduinoJson-5.11.2/src/ArduinoJson.h | 12 -
.../src/ArduinoJson/Data/ValueSetter.hpp | 51 ---
.../src/ArduinoJson/Polyfills/isInteger.hpp | 22 --
.../src/ArduinoJson/RawJson.hpp | 23 --
.../TypeTraits/IsSignedIntegral.hpp | 33 --
.../TypeTraits/IsUnsignedIntegral.hpp | 33 --
lib/ArduinoJson-5.13.4/ArduinoJson.h | 5 +
.../CHANGELOG.md | 317 ++++++++----------
.../LICENSE.md | 2 +-
lib/ArduinoJson-5.13.4/README.md | 110 ++++++
.../JsonConfigFile/JsonConfigFile.ino | 144 ++++++++
.../JsonGeneratorExample.ino | 29 +-
.../JsonHttpClient/JsonHttpClient.ino | 112 +++++++
.../JsonParserExample/JsonParserExample.ino | 31 +-
.../examples/JsonServer/JsonServer.ino | 109 ++++++
.../examples/JsonUdpBeacon/JsonUdpBeacon.ino | 101 ++++++
.../ProgmemExample/ProgmemExample.ino | 38 ++-
.../examples/StringExample/StringExample.ino | 33 +-
.../keywords.txt | 0
lib/ArduinoJson-5.13.4/library.properties | 11 +
lib/ArduinoJson-5.13.4/src/ArduinoJson.h | 17 +
.../src/ArduinoJson.hpp | 9 +-
.../src/ArduinoJson/Configuration.hpp | 10 +-
.../src/ArduinoJson/Data/Encoding.hpp | 7 +-
.../ArduinoJson/Data/JsonBufferAllocated.hpp | 7 +-
.../src/ArduinoJson/Data/JsonFloat.hpp | 7 +-
.../src/ArduinoJson/Data/JsonInteger.hpp | 7 +-
.../src/ArduinoJson/Data/JsonVariantAs.hpp | 7 +-
.../ArduinoJson/Data/JsonVariantContent.hpp | 7 +-
.../ArduinoJson/Data/JsonVariantDefault.hpp | 7 +-
.../src/ArduinoJson/Data/JsonVariantType.hpp | 7 +-
.../src/ArduinoJson/Data/List.hpp | 7 +-
.../ArduinoJson/Data/ListConstIterator.hpp | 7 +-
.../src/ArduinoJson/Data/ListIterator.hpp | 7 +-
.../src/ArduinoJson/Data/ListNode.hpp | 7 +-
.../src/ArduinoJson/Data/NonCopyable.hpp | 7 +-
.../src/ArduinoJson/Data/ReferenceType.hpp | 7 +-
.../src/ArduinoJson/Data/ValueSaver.hpp | 52 +++
.../ArduinoJson/Deserialization/Comments.hpp | 7 +-
.../Deserialization/JsonParser.hpp | 29 +-
.../Deserialization/JsonParserImpl.hpp | 35 +-
.../Deserialization/StringWriter.hpp | 7 +-
.../src/ArduinoJson/DynamicJsonBuffer.hpp | 12 +-
.../src/ArduinoJson/JsonArray.hpp | 48 ++-
.../src/ArduinoJson/JsonArrayImpl.hpp | 7 +-
.../src/ArduinoJson/JsonArraySubscript.hpp | 61 ++--
.../src/ArduinoJson/JsonBuffer.hpp | 24 +-
.../src/ArduinoJson/JsonBufferBase.hpp | 21 +-
.../src/ArduinoJson/JsonBufferImpl.hpp | 7 +-
.../src/ArduinoJson/JsonObject.hpp | 195 +++++------
.../src/ArduinoJson/JsonObjectImpl.hpp | 7 +-
.../src/ArduinoJson/JsonObjectSubscript.hpp | 41 +--
.../src/ArduinoJson/JsonPair.hpp | 7 +-
.../src/ArduinoJson/JsonVariant.hpp | 115 ++++---
.../src/ArduinoJson/JsonVariantBase.hpp | 15 +-
.../src/ArduinoJson/JsonVariantCasts.hpp | 9 +-
.../ArduinoJson/JsonVariantComparisons.hpp | 41 +--
.../src/ArduinoJson/JsonVariantImpl.hpp | 15 +-
.../src/ArduinoJson/JsonVariantOr.hpp | 52 +++
.../src/ArduinoJson/JsonVariantSubscripts.hpp | 35 +-
.../src/ArduinoJson/Polyfills/attributes.hpp | 9 +-
.../src/ArduinoJson/Polyfills/ctype.hpp | 9 +-
.../src/ArduinoJson/Polyfills/isFloat.hpp | 9 +-
.../src/ArduinoJson/Polyfills/isInteger.hpp | 19 ++
.../src/ArduinoJson/Polyfills/math.hpp | 9 +-
.../src/ArduinoJson/Polyfills/parseFloat.hpp | 11 +-
.../ArduinoJson/Polyfills/parseInteger.hpp | 9 +-
.../src/ArduinoJson/RawJson.hpp | 46 +++
.../ArduinoJson/Serialization/DummyPrint.hpp | 7 +-
.../Serialization/DynamicStringBuilder.hpp | 7 +-
.../ArduinoJson/Serialization/FloatParts.hpp | 9 +-
.../Serialization/IndentedPrint.hpp | 7 +-
.../Serialization/JsonPrintable.hpp | 21 +-
.../Serialization/JsonSerializer.hpp | 14 +-
.../Serialization/JsonSerializerImpl.hpp | 7 +-
.../ArduinoJson/Serialization/JsonWriter.hpp | 11 +-
.../ArduinoJson/Serialization/Prettyfier.hpp | 7 +-
.../Serialization/StaticStringBuilder.hpp | 7 +-
.../Serialization/StreamPrintAdapter.hpp | 7 +-
.../src/ArduinoJson/StaticJsonBuffer.hpp | 14 +-
.../StringTraits/ArduinoStream.hpp | 20 +-
.../ArduinoJson/StringTraits/CharPointer.hpp | 32 +-
.../ArduinoJson/StringTraits/FlashString.hpp | 25 +-
.../ArduinoJson/StringTraits/StdStream.hpp | 20 +-
.../ArduinoJson/StringTraits/StdString.hpp | 27 +-
.../ArduinoJson/StringTraits/StringTraits.hpp | 28 +-
.../src/ArduinoJson/TypeTraits/EnableIf.hpp | 9 +-
.../ArduinoJson/TypeTraits/FloatTraits.hpp | 54 ++-
.../src/ArduinoJson/TypeTraits/IsArray.hpp | 9 +-
.../src/ArduinoJson/TypeTraits/IsBaseOf.hpp | 9 +-
.../src/ArduinoJson/TypeTraits/IsChar.hpp | 9 +-
.../src/ArduinoJson/TypeTraits/IsConst.hpp | 9 +-
.../TypeTraits/IsFloatingPoint.hpp | 9 +-
.../src/ArduinoJson/TypeTraits/IsIntegral.hpp | 15 +-
.../src/ArduinoJson/TypeTraits/IsSame.hpp | 9 +-
.../TypeTraits/IsSignedIntegral.hpp | 28 ++
.../TypeTraits/IsUnsignedIntegral.hpp | 28 ++
.../src/ArduinoJson/TypeTraits/IsVariant.hpp | 9 +-
.../ArduinoJson/TypeTraits/RemoveConst.hpp | 9 +-
.../TypeTraits/RemoveReference.hpp | 9 +-
.../src/ArduinoJson/version.hpp | 10 +
107 files changed, 1652 insertions(+), 1620 deletions(-)
delete mode 100644 lib/ArduinoJson-5.11.2/ArduinoJson.h
delete mode 100644 lib/ArduinoJson-5.11.2/README.md
delete mode 100644 lib/ArduinoJson-5.11.2/examples/JsonHttpClient/JsonHttpClient.ino
delete mode 100644 lib/ArduinoJson-5.11.2/examples/JsonServer/JsonServer.ino
delete mode 100644 lib/ArduinoJson-5.11.2/examples/JsonUdpBeacon/JsonUdpBeacon.ino
delete mode 100644 lib/ArduinoJson-5.11.2/library.properties
delete mode 100644 lib/ArduinoJson-5.11.2/src/ArduinoJson.h
delete mode 100644 lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ValueSetter.hpp
delete mode 100644 lib/ArduinoJson-5.11.2/src/ArduinoJson/Polyfills/isInteger.hpp
delete mode 100644 lib/ArduinoJson-5.11.2/src/ArduinoJson/RawJson.hpp
delete mode 100644 lib/ArduinoJson-5.11.2/src/ArduinoJson/TypeTraits/IsSignedIntegral.hpp
delete mode 100644 lib/ArduinoJson-5.11.2/src/ArduinoJson/TypeTraits/IsUnsignedIntegral.hpp
create mode 100644 lib/ArduinoJson-5.13.4/ArduinoJson.h
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/CHANGELOG.md (68%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/LICENSE.md (96%)
create mode 100644 lib/ArduinoJson-5.13.4/README.md
create mode 100644 lib/ArduinoJson-5.13.4/examples/JsonConfigFile/JsonConfigFile.ino
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/examples/JsonGeneratorExample/JsonGeneratorExample.ino (63%)
create mode 100644 lib/ArduinoJson-5.13.4/examples/JsonHttpClient/JsonHttpClient.ino
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/examples/JsonParserExample/JsonParserExample.ino (61%)
create mode 100644 lib/ArduinoJson-5.13.4/examples/JsonServer/JsonServer.ino
create mode 100644 lib/ArduinoJson-5.13.4/examples/JsonUdpBeacon/JsonUdpBeacon.ino
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/examples/ProgmemExample/ProgmemExample.ino (52%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/examples/StringExample/StringExample.ino (67%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/keywords.txt (100%)
create mode 100644 lib/ArduinoJson-5.13.4/library.properties
create mode 100644 lib/ArduinoJson-5.13.4/src/ArduinoJson.h
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson.hpp (75%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Configuration.hpp (94%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/Encoding.hpp (80%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/JsonBufferAllocated.hpp (68%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/JsonFloat.hpp (56%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/JsonInteger.hpp (70%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/JsonVariantAs.hpp (80%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/JsonVariantContent.hpp (79%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/JsonVariantDefault.hpp (68%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/JsonVariantType.hpp (84%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/List.hpp (93%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/ListConstIterator.hpp (85%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/ListIterator.hpp (86%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/ListNode.hpp (70%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/NonCopyable.hpp (67%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Data/ReferenceType.hpp (74%)
create mode 100644 lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ValueSaver.hpp
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Deserialization/Comments.hpp (88%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Deserialization/JsonParser.hpp (77%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Deserialization/JsonParserImpl.hpp (85%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Deserialization/StringWriter.hpp (79%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/DynamicJsonBuffer.hpp (94%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonArray.hpp (82%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonArrayImpl.hpp (75%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonArraySubscript.hpp (69%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonBuffer.hpp (74%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonBufferBase.hpp (88%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonBufferImpl.hpp (72%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonObject.hpp (57%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonObjectImpl.hpp (79%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonObjectSubscript.hpp (66%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonPair.hpp (53%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonVariant.hpp (72%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonVariantBase.hpp (59%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonVariantCasts.hpp (89%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonVariantComparisons.hpp (75%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonVariantImpl.hpp (87%)
create mode 100644 lib/ArduinoJson-5.13.4/src/ArduinoJson/JsonVariantOr.hpp
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/JsonVariantSubscripts.hpp (70%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Polyfills/attributes.hpp (74%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Polyfills/ctype.hpp (50%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Polyfills/isFloat.hpp (75%)
create mode 100644 lib/ArduinoJson-5.13.4/src/ArduinoJson/Polyfills/isInteger.hpp
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Polyfills/math.hpp (52%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Polyfills/parseFloat.hpp (89%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Polyfills/parseInteger.hpp (75%)
create mode 100644 lib/ArduinoJson-5.13.4/src/ArduinoJson/RawJson.hpp
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/DummyPrint.hpp (64%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/DynamicStringBuilder.hpp (80%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/FloatParts.hpp (91%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/IndentedPrint.hpp (89%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/JsonPrintable.hpp (80%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/JsonSerializer.hpp (79%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/JsonSerializerImpl.hpp (94%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/JsonWriter.hpp (91%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/Prettyfier.hpp (93%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/StaticStringBuilder.hpp (77%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/Serialization/StreamPrintAdapter.hpp (77%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/StaticJsonBuffer.hpp (89%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/StringTraits/ArduinoStream.hpp (64%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/StringTraits/CharPointer.hpp (54%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/StringTraits/FlashString.hpp (64%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/StringTraits/StdStream.hpp (63%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/StringTraits/StdString.hpp (70%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/StringTraits/StringTraits.hpp (55%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/EnableIf.hpp (58%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/FloatTraits.hpp (68%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/IsArray.hpp (67%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/IsBaseOf.hpp (73%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/IsChar.hpp (69%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/IsConst.hpp (61%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/IsFloatingPoint.hpp (60%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/IsIntegral.hpp (50%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/IsSame.hpp (62%)
create mode 100644 lib/ArduinoJson-5.13.4/src/ArduinoJson/TypeTraits/IsSignedIntegral.hpp
create mode 100644 lib/ArduinoJson-5.13.4/src/ArduinoJson/TypeTraits/IsUnsignedIntegral.hpp
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/IsVariant.hpp (50%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/RemoveConst.hpp (59%)
rename lib/{ArduinoJson-5.11.2 => ArduinoJson-5.13.4}/src/ArduinoJson/TypeTraits/RemoveReference.hpp (60%)
create mode 100644 lib/ArduinoJson-5.13.4/src/ArduinoJson/version.hpp
diff --git a/lib/ArduinoJson-5.11.2/ArduinoJson.h b/lib/ArduinoJson-5.11.2/ArduinoJson.h
deleted file mode 100644
index 896503a6c..000000000
--- a/lib/ArduinoJson-5.11.2/ArduinoJson.h
+++ /dev/null
@@ -1,8 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
-
-#include "src/ArduinoJson.h"
diff --git a/lib/ArduinoJson-5.11.2/README.md b/lib/ArduinoJson-5.11.2/README.md
deleted file mode 100644
index 6ee8a37a6..000000000
--- a/lib/ArduinoJson-5.11.2/README.md
+++ /dev/null
@@ -1,130 +0,0 @@
-[![Build status](https://ci.appveyor.com/api/projects/status/m7s53wav1l0abssg/branch/master?svg=true)](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/master) [![Build Status](https://travis-ci.org/bblanchon/ArduinoJson.svg?branch=master)](https://travis-ci.org/bblanchon/ArduinoJson) [![Coverage Status](https://img.shields.io/coveralls/bblanchon/ArduinoJson.svg)](https://coveralls.io/r/bblanchon/ArduinoJson?branch=master) [![Star this project](http://githubbadges.com/star.svg?user=bblanchon&repo=ArduinoJson&style=flat&color=fff&background=007ec6)](https://github.com/bblanchon/ArduinoJson)
-
-![ArduinoJson's logo](banner.svg)
-
-ArduinoJson - C++ JSON library for IoT
-====================
-
-*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
---------
-
-* Arduino boards: Uno, Due, Mini, Micro, Yun...
-* ESP8266, ESP32
-* Teensy
-* RedBearLab boards (BLE Nano...)
-* Intel Edison and Galileo
-* WeMos boards: D1...
-* Computers: Windows, Linux, OSX...
-* PlatformIO
-* Particle
-* Energia
-
-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)
-
-Use [ArduinoJson Assistant](https://bblanchon.github.io/ArduinoJson/assistant/) to compute the buffer size.
-
-#### 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);
-data.add(2.302038);
-
-root.printTo(Serial);
-// This prints:
-// {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
-```
-
-[See JsonGeneratorExample.ino](examples/JsonGeneratorExample/JsonGeneratorExample.ino)
-
-Use [ArduinoJson Assistant](https://bblanchon.github.io/ArduinoJson/assistant/) to compute the buffer size.
-
-
-Documentation
--------------
-
-The documentation is available online in the [ArduinoJson Website](https://bblanchon.github.io/ArduinoJson/).
-
-The [ArduinoJson Assistant](https://bblanchon.github.io/ArduinoJson/assistant/) helps you get started with the library.
-
-
-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
-* OpenEVSE LLC
-* Prokhoryatov Alexey
-* Google Inc.
-* Charles Haynes
-* Charles Walker
-* Günther Jehle
-* Patrick Elliott
-
-
----
-
-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/ArduinoJson-5.11.2/examples/JsonHttpClient/JsonHttpClient.ino b/lib/ArduinoJson-5.11.2/examples/JsonHttpClient/JsonHttpClient.ino
deleted file mode 100644
index 5edb817f1..000000000
--- a/lib/ArduinoJson-5.11.2/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://bblanchon.github.io/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.
- // See https://bblanchon.github.io/ArduinoJson/assistant/
- 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/ArduinoJson-5.11.2/examples/JsonServer/JsonServer.ino b/lib/ArduinoJson-5.11.2/examples/JsonServer/JsonServer.ino
deleted file mode 100644
index 555842b82..000000000
--- a/lib/ArduinoJson-5.11.2/examples/JsonServer/JsonServer.ino
+++ /dev/null
@@ -1,76 +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) {
- // Use https://bblanchon.github.io/ArduinoJson/assistant/ to
- // compute the right size for the buffer
- StaticJsonBuffer<500> jsonBuffer;
- JsonObject& json = prepareResponse(jsonBuffer);
- writeResponse(client, json);
- }
- delay(1);
- client.stop();
- }
-}
diff --git a/lib/ArduinoJson-5.11.2/examples/JsonUdpBeacon/JsonUdpBeacon.ino b/lib/ArduinoJson-5.11.2/examples/JsonUdpBeacon/JsonUdpBeacon.ino
deleted file mode 100644
index b3bd5fc50..000000000
--- a/lib/ArduinoJson-5.11.2/examples/JsonUdpBeacon/JsonUdpBeacon.ino
+++ /dev/null
@@ -1,57 +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);
-
- // Use https://bblanchon.github.io/ArduinoJson/assistant/ to
- // compute the right size for the buffer
- StaticJsonBuffer<300> jsonBuffer;
- JsonObject& json = buildJson(jsonBuffer);
- sendJson(json);
-}
diff --git a/lib/ArduinoJson-5.11.2/library.properties b/lib/ArduinoJson-5.11.2/library.properties
deleted file mode 100644
index 9809a3c0b..000000000
--- a/lib/ArduinoJson-5.11.2/library.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-name=ArduinoJson
-version=5.11.2
-author=Benoit Blanchon
-maintainer=Benoit Blanchon
-sentence=An efficient and elegant JSON library for Arduino.
-paragraph=Like this project? Please star it on GitHub!
-category=Data Processing
-url=https://bblanchon.github.io/ArduinoJson/
-architectures=*
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson.h b/lib/ArduinoJson-5.11.2/src/ArduinoJson.h
deleted file mode 100644
index c1ec7c02f..000000000
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson.h
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "ArduinoJson.hpp"
-
-using namespace ArduinoJson;
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ValueSetter.hpp b/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ValueSetter.hpp
deleted file mode 100644
index 7eb3ed63b..000000000
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ValueSetter.hpp
+++ /dev/null
@@ -1,51 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/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, TSourceRef source) {
- destination = source;
- return true;
- }
-};
-
-template
-struct ValueSetter::should_duplicate>::type> {
- template
- static bool set(JsonBuffer* buffer, TDestination& destination,
- TSourceRef 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, TSourceRef source) {
- // unsigned char* -> char*
- destination = reinterpret_cast(source);
- return true;
- }
-};
-}
-}
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Polyfills/isInteger.hpp b/lib/ArduinoJson-5.11.2/src/ArduinoJson/Polyfills/isInteger.hpp
deleted file mode 100644
index ea39f2a63..000000000
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Polyfills/isInteger.hpp
+++ /dev/null
@@ -1,22 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "./ctype.hpp"
-
-namespace ArduinoJson {
-namespace Polyfills {
-
-inline bool isInteger(const char* s) {
- if (!s) return false;
- if (issign(*s)) s++;
- while (isdigit(*s)) s++;
- return *s == '\0';
-}
-}
-}
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/RawJson.hpp b/lib/ArduinoJson-5.11.2/src/ArduinoJson/RawJson.hpp
deleted file mode 100644
index 6db195c32..000000000
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/RawJson.hpp
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
-
-#pragma once
-
-namespace ArduinoJson {
-
-// A special type of data that can be used to insert pregenerated JSON portions.
-class RawJson {
- public:
- explicit RawJson(const char* str) : _str(str) {}
- operator const char*() const {
- return _str;
- }
-
- private:
- const char* _str;
-};
-}
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/TypeTraits/IsSignedIntegral.hpp b/lib/ArduinoJson-5.11.2/src/ArduinoJson/TypeTraits/IsSignedIntegral.hpp
deleted file mode 100644
index fde6e13b0..000000000
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/TypeTraits/IsSignedIntegral.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../Configuration.hpp"
-#include "IsSame.hpp"
-
-namespace ArduinoJson {
-namespace TypeTraits {
-
-// A meta-function that returns true if T is an integral type.
-template
-struct IsSignedIntegral {
- static const bool value = TypeTraits::IsSame::value ||
- TypeTraits::IsSame::value ||
- TypeTraits::IsSame::value ||
- TypeTraits::IsSame::value ||
-#if ARDUINOJSON_USE_LONG_LONG
- TypeTraits::IsSame::value ||
-#endif
-
-#if ARDUINOJSON_USE_INT64
- TypeTraits::IsSame::value ||
-#endif
- false;
-};
-}
-}
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/TypeTraits/IsUnsignedIntegral.hpp b/lib/ArduinoJson-5.11.2/src/ArduinoJson/TypeTraits/IsUnsignedIntegral.hpp
deleted file mode 100644
index 173763e05..000000000
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/TypeTraits/IsUnsignedIntegral.hpp
+++ /dev/null
@@ -1,33 +0,0 @@
-// Copyright Benoit Blanchon 2014-2017
-// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
-
-#pragma once
-
-#include "../Configuration.hpp"
-#include "IsSame.hpp"
-
-namespace ArduinoJson {
-namespace TypeTraits {
-
-// A meta-function that returns true if T is an integral type.
-template
-struct IsUnsignedIntegral {
- static const bool value = TypeTraits::IsSame::value ||
- TypeTraits::IsSame::value ||
- TypeTraits::IsSame::value ||
- TypeTraits::IsSame::value ||
-#if ARDUINOJSON_USE_LONG_LONG
- TypeTraits::IsSame::value ||
-#endif
-
-#if ARDUINOJSON_USE_INT64
- TypeTraits::IsSame::value ||
-#endif
- false;
-};
-}
-}
diff --git a/lib/ArduinoJson-5.13.4/ArduinoJson.h b/lib/ArduinoJson-5.13.4/ArduinoJson.h
new file mode 100644
index 000000000..9f78b9f18
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/ArduinoJson.h
@@ -0,0 +1,5 @@
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
+// MIT License
+
+#include "src/ArduinoJson.h"
diff --git a/lib/ArduinoJson-5.11.2/CHANGELOG.md b/lib/ArduinoJson-5.13.4/CHANGELOG.md
similarity index 68%
rename from lib/ArduinoJson-5.11.2/CHANGELOG.md
rename to lib/ArduinoJson-5.13.4/CHANGELOG.md
index 490e25c8c..3616b176a 100644
--- a/lib/ArduinoJson-5.11.2/CHANGELOG.md
+++ b/lib/ArduinoJson-5.13.4/CHANGELOG.md
@@ -1,6 +1,78 @@
ArduinoJson: change log
=======================
+v5.13.4
+-------
+
+* Removed spurious files in the Particle library
+
+v5.13.3
+-------
+
+* Improved float serialization when `-fsingle-precision-constant` is used
+* Fixed `JsonVariant::is()` that returned true for empty strings
+* Fixed `JsonVariant::is()` (closes #763)
+
+v5.13.2
+-------
+
+* Fixed `JsonBuffer::parse()` not respecting nesting limit correctly (issue #693)
+* Fixed inconsistencies in nesting level counting (PR #695 from Zhenyu Wu)
+* Fixed null values that could be pass to `strcmp()` (PR #745 from Mike Karlesky)
+* Added macros `ARDUINOJSON_VERSION`, `ARDUINOJSON_VERSION_MAJOR`...
+
+v5.13.1
+-------
+
+* Fixed `JsonVariant::operator|(int)` that returned the default value if the variant contained a double (issue #675)
+* Allowed non-quoted key to contain underscores (issue #665)
+
+v5.13.0
+-------
+
+* Changed the rules of string duplication (issue #658)
+* `RawJson()` accepts any kind of string and obeys to the same rules for duplication
+* Changed the return type of `strdup()` to `const char*` to prevent double duplication
+* Marked `strdup()` as deprecated
+
+> ### New rules for string duplication
+>
+> | type | duplication |
+> |:---------------------------|:------------|
+> | const char* | no |
+> | char* | ~~no~~ yes |
+> | String | yes |
+> | std::string | yes |
+> | const __FlashStringHelper* | yes |
+>
+> These new rules make `JsonBuffer::strdup()` useless.
+
+v5.12.0
+-------
+
+* Added `JsonVariant::operator|` to return a default value (see below)
+* Added a clear error message when compiled as C instead of C++ (issue #629)
+* Added detection of MPLAB XC compiler (issue #629)
+* Added detection of Keil ARM Compiler (issue #629)
+* Added an example that shows how to save and load a configuration file
+* Reworked all other examples
+
+> ### How to use the new feature?
+>
+> If you have a block like this:
+>
+> ```c++
+> const char* ssid = root["ssid"];
+> if (!ssid)
+> ssid = "default ssid";
+> ```
+>
+> You can simplify like that:
+>
+> ```c++
+> const char* ssid = root["ssid"] | "default ssid";
+> ```
+
v5.11.2
-------
@@ -42,27 +114,26 @@ v5.10.0
* Fixed error `IsBaseOf is not a member of ArduinoJson::TypeTraits` (issue #495)
* Fixed error `forming reference to reference` (issue #495)
-### BREAKING CHANGES :warning:
-
-| Old syntax | New syntax |
-|---------------------------------|---------------------|
-| `double_with_n_digits(3.14, 2)` | `3.14` |
-| `float_with_n_digits(3.14, 2)` | `3.14f` |
-| `obj.set("key", 3.14, 2)` | `obj["key"] = 3.14` |
-| `arr.add(3.14, 2)` | `arr.add(3.14)` |
-
-| Input | Old output | New output |
-|-----------|------------|------------|
-| `3.14159` | `3.14` | `3.14159` |
-| `42.0` | `42.00` | `42` |
-| `0.0` | `0.00` | `0` |
-
-| Expression | Old result | New result |
-|--------------------------------|------------|------------|
-| `JsonVariant(42).is()` | `true` | `true` |
-| `JsonVariant(42).is()` | `false` | `true` |
-| `JsonVariant(42).is()` | `false` | `true` |
-
+> ### BREAKING CHANGES :warning:
+>
+> | Old syntax | New syntax |
+> |:--------------------------------|:--------------------|
+> | `double_with_n_digits(3.14, 2)` | `3.14` |
+> | `float_with_n_digits(3.14, 2)` | `3.14f` |
+> | `obj.set("key", 3.14, 2)` | `obj["key"] = 3.14` |
+> | `arr.add(3.14, 2)` | `arr.add(3.14)` |
+>
+> | Input | Old output | New output |
+> |:----------|:-----------|:-----------|
+> | `3.14159` | `3.14` | `3.14159` |
+> | `42.0` | `42.00` | `42` |
+> | `0.0` | `0.00` | `0` |
+>
+> | Expression | Old result | New result |
+> |:-------------------------------|:-----------|:-----------|
+> | `JsonVariant(42).is()` | `true` | `true` |
+> | `JsonVariant(42).is()` | `false` | `true` |
+> | `JsonVariant(42).is()` | `false` | `true` |
v5.9.0
------
@@ -116,24 +187,23 @@ v5.8.0
* Added support for `Stream` (issue #300)
* Reduced memory consumption by not duplicating spaces and comments
-### BREAKING CHANGES :warning:
-
-`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);
-```
-
+> ### BREAKING CHANGES :warning:
+>
+> `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
------
@@ -166,27 +236,26 @@ v5.7.0
* 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 :warning:
-
-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);
-```
-
+> ### BREAKING CHANGES :warning:
+>
+> 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
------
@@ -278,8 +347,9 @@ 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`.
+> ### BREAKING CHANGE :warning:
+>
+> If you defined `ARDUINOJSON_ENABLE_STD_STREAM`, you now need to define it to `1`.
v5.0.8
------
@@ -293,10 +363,10 @@ 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 :warning:
-
-- `JsonVariant(true).as()` now returns `"true"` instead of `"1"`
-- `JsonVariant(false).as()` now returns `"false"` instead of `"0"`
+> ### BREAKING CHANGES :warning:
+>
+> - `JsonVariant(true).as()` now returns `"true"` instead of `"1"`
+> - `JsonVariant(false).as()` now returns `"false"` instead of `"0"`
v5.0.6
------
@@ -350,11 +420,11 @@ v5.0.0
* 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 :warning:
-
-- `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()`
+> ### BREAKING CHANGES :warning:
+>
+> - `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.
@@ -407,106 +477,7 @@ 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).
+> ### BREAKING CHANGES :warning:
+>
+> API changed significantly since v3, see [Migrating code to the new API](https://arduinojson.org/doc/migration/).
-
-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/ArduinoJson-5.11.2/LICENSE.md b/lib/ArduinoJson-5.13.4/LICENSE.md
similarity index 96%
rename from lib/ArduinoJson-5.11.2/LICENSE.md
rename to lib/ArduinoJson-5.13.4/LICENSE.md
index 9f35ed446..f0c4b5ae7 100644
--- a/lib/ArduinoJson-5.11.2/LICENSE.md
+++ b/lib/ArduinoJson-5.13.4/LICENSE.md
@@ -1,7 +1,7 @@
The MIT License (MIT)
---------------------
-Copyright © 2014-2017 Benoit BLANCHON
+Copyright © 2014-2018 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:
diff --git a/lib/ArduinoJson-5.13.4/README.md b/lib/ArduinoJson-5.13.4/README.md
new file mode 100644
index 000000000..8ddc698fc
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/README.md
@@ -0,0 +1,110 @@
+![ArduinoJson](banner.svg)
+
+---
+
+[![Build status](https://ci.appveyor.com/api/projects/status/m7s53wav1l0abssg/branch/master?svg=true)](https://ci.appveyor.com/project/bblanchon/arduinojson/branch/master) [![Build Status](https://travis-ci.org/bblanchon/ArduinoJson.svg?branch=master)](https://travis-ci.org/bblanchon/ArduinoJson) [![Coverage Status](https://img.shields.io/coveralls/bblanchon/ArduinoJson.svg)](https://coveralls.io/r/bblanchon/ArduinoJson?branch=master) [![Star this project](http://githubbadges.com/star.svg?user=bblanchon&repo=ArduinoJson&style=flat&color=fff&background=007ec6)](https://github.com/bblanchon/ArduinoJson)
+
+ArduinoJson is a C++ JSON library for Arduino and IoT (Internet Of Things).
+
+## Features
+
+* JSON decoding (comments are supported)
+* JSON encoding (with optional indentation)
+* Elegant API, easy to use
+* Fixed memory allocation (zero malloc)
+* No data duplication (zero copy)
+* Portable (written in C++98, can be used in any C++ project)
+* Self-contained (no external dependency)
+* Small footprint
+* Input and output streams
+* [100% code coverage](https://coveralls.io/github/bblanchon/ArduinoJson)
+* [Header-only library](https://en.wikipedia.org/wiki/Header-only)
+* [MIT License](https://en.wikipedia.org/wiki/MIT_License)
+* [Comprehensive documentation](https://arduinojson.org?utm_source=github&utm_medium=readme)
+
+## Compatibility
+
+ArduinoJson works on the following hardware:
+
+* Arduino boards: [Uno](https://www.arduino.cc/en/Main/ArduinoBoardUno), [Due](https://www.arduino.cc/en/Main/ArduinoBoardDue), [Mini](https://www.arduino.cc/en/Main/ArduinoBoardMini), [Micro](https://www.arduino.cc/en/Main/ArduinoBoardMicro), [Yun](https://www.arduino.cc/en/Main/ArduinoBoardYun)...
+* Espressif chips: [ESP8266](https://en.wikipedia.org/wiki/ESP8266), [ESP32](https://en.wikipedia.org/wiki/ESP32)
+* WeMos boards: [D1](https://wiki.wemos.cc/products:d1:d1), [D1 mini](https://wiki.wemos.cc/products:d1:d1_mini), ...
+* RedBearLab boards: [BLE Nano](http://redbearlab.com/blenano/), [BLE Mini](http://redbearlab.com/blemini/), [WiFi Micro](https://redbear.cc/product/wifi/wifi-micro.html), [LOLIN32](https://wiki.wemos.cc/products:lolin32:lolin32)...
+* [Teensy](https://www.pjrc.com/teensy/) boards
+* Intel boards: Edison, Galileo...
+* Particle boards: [Photon](https://www.particle.io/products/hardware/photon-wifi-dev-kit), [Electron](https://www.particle.io/products/hardware/electron-cellular-dev-kit)...
+* Texas Instruments boards: [MSP430](http://www.ti.com/microcontrollers/msp430-ultra-low-power-mcus/overview/overview.html)...
+
+ArduinoJson compiles with zero warning on the following compilers, IDEs, and platforms:
+
+* [Arduino IDE](https://www.arduino.cc/en/Main/Software)
+* [PlatformIO](http://platformio.org/)
+* [Energia](http://energia.nu/)
+* [Visual Micro](http://www.visualmicro.com/)
+* [Atmel Studio](http://www.atmel.com/microsite/atmel-studio/)
+* [IAR Embedded Workbench](https://www.iar.com/iar-embedded-workbench/)
+* [Atollic TrueSTUDIO](https://atollic.com/truestudio/)
+* [Keil uVision](http://www.keil.com/)
+* [MPLAB X IDE](http://www.microchip.com/mplab/mplab-x-ide)
+* [GCC](https://gcc.gnu.org/)
+* [Clang](https://clang.llvm.org/)
+* [Visual Studio](https://www.visualstudio.com/)
+
+## Quickstart
+
+### Deserialization
+
+Here is a program that parses a JSON document with ArduinoJson.
+
+```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 the [tutorial on arduinojson.org](https://arduinojson.org/doc/decoding/?utm_source=github&utm_medium=readme)
+
+### Serialization
+
+Here is a program that generates a JSON document with ArduinoJson:
+
+```c++
+StaticJsonBuffer<200> jsonBuffer;
+
+JsonObject& root = jsonBuffer.createObject();
+root["sensor"] = "gps";
+root["time"] = 1351824120;
+
+JsonArray& data = root.createNestedArray("data");
+data.add(48.756080);
+data.add(2.302038);
+
+root.printTo(Serial);
+// This prints:
+// {"sensor":"gps","time":1351824120,"data":[48.756080,2.302038]}
+```
+
+See the [tutorial on arduinojson.org](https://arduinojson.org/doc/encoding/?utm_source=github&utm_medium=readme)
+
+## Documentation
+
+The documentation is available on [arduinojson.org](https://arduinojson.org/?utm_source=github&utm_medium=readme), here are some shortcuts:
+
+* The [Examples](https://arduinojson.org/example/?utm_source=github&utm_medium=readme) show how to use the library in various situations.
+* The [API Reference](https://arduinojson.org/api/?utm_source=github&utm_medium=readme) contains the description of each class and function.
+* The [FAQ](https://arduinojson.org/faq/?utm_source=github&utm_medium=readme) has the answer to virtually every question.
+* The [ArduinoJson Assistant](https://arduinojson.org/assistant/?utm_source=github&utm_medium=readme) writes programs for you!
+
+---
+
+Do you like this library? Please [star this project on GitHub](https://github.com/bblanchon/ArduinoJson/stargazers)!
+
+What? You don't like it but you *love* it?
+We don't take donations anymore, but [we sell a book](https://arduinojson.org/book/?utm_source=github&utm_medium=readme), so you can help and learn at the same time!
\ No newline at end of file
diff --git a/lib/ArduinoJson-5.13.4/examples/JsonConfigFile/JsonConfigFile.ino b/lib/ArduinoJson-5.13.4/examples/JsonConfigFile/JsonConfigFile.ino
new file mode 100644
index 000000000..2ccf7d673
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/examples/JsonConfigFile/JsonConfigFile.ino
@@ -0,0 +1,144 @@
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
+// MIT License
+//
+// This example shows how to store your project configuration in a file.
+// It uses the SD library but can be easily modified for any other file-system.
+//
+// The file contains a JSON document with the following content:
+// {
+// "hostname": "examples.com",
+// "port": 2731
+// }
+
+#include
+#include
+#include
+
+// Configuration that we'll store on disk
+struct Config {
+ char hostname[64];
+ int port;
+};
+
+const char *filename = "/config.txt"; // <- SD library uses 8.3 filenames
+Config config; // <- global configuration object
+
+// Loads the configuration from a file
+void loadConfiguration(const char *filename, Config &config) {
+ // Open file for reading
+ File file = SD.open(filename);
+
+ // Allocate the memory pool on the stack.
+ // Don't forget to change the capacity to match your JSON document.
+ // Use arduinojson.org/assistant to compute the capacity.
+ StaticJsonBuffer<512> jsonBuffer;
+
+ // Parse the root object
+ JsonObject &root = jsonBuffer.parseObject(file);
+
+ if (!root.success())
+ Serial.println(F("Failed to read file, using default configuration"));
+
+ // Copy values from the JsonObject to the Config
+ config.port = root["port"] | 2731;
+ strlcpy(config.hostname, // <- destination
+ root["hostname"] | "example.com", // <- source
+ sizeof(config.hostname)); // <- destination's capacity
+
+ // Close the file (File's destructor doesn't close the file)
+ file.close();
+}
+
+// Saves the configuration to a file
+void saveConfiguration(const char *filename, const Config &config) {
+ // Delete existing file, otherwise the configuration is appended to the file
+ SD.remove(filename);
+
+ // Open file for writing
+ File file = SD.open(filename, FILE_WRITE);
+ if (!file) {
+ Serial.println(F("Failed to create file"));
+ return;
+ }
+
+ // Allocate the memory pool on the stack
+ // Don't forget to change the capacity to match your JSON document.
+ // Use https://arduinojson.org/assistant/ to compute the capacity.
+ StaticJsonBuffer<256> jsonBuffer;
+
+ // Parse the root object
+ JsonObject &root = jsonBuffer.createObject();
+
+ // Set the values
+ root["hostname"] = config.hostname;
+ root["port"] = config.port;
+
+ // Serialize JSON to file
+ if (root.printTo(file) == 0) {
+ Serial.println(F("Failed to write to file"));
+ }
+
+ // Close the file (File's destructor doesn't close the file)
+ file.close();
+}
+
+// Prints the content of a file to the Serial
+void printFile(const char *filename) {
+ // Open file for reading
+ File file = SD.open(filename);
+ if (!file) {
+ Serial.println(F("Failed to read file"));
+ return;
+ }
+
+ // Extract each characters by one by one
+ while (file.available()) {
+ Serial.print((char)file.read());
+ }
+ Serial.println();
+
+ // Close the file (File's destructor doesn't close the file)
+ file.close();
+}
+
+void setup() {
+ // Initialize serial port
+ Serial.begin(9600);
+ while (!Serial) continue;
+
+ // Initialize SD library
+ while (!SD.begin()) {
+ Serial.println(F("Failed to initialize SD library"));
+ delay(1000);
+ }
+
+ // Should load default config if run for the first time
+ Serial.println(F("Loading configuration..."));
+ loadConfiguration(filename, config);
+
+ // Create configuration file
+ Serial.println(F("Saving configuration..."));
+ saveConfiguration(filename, config);
+
+ // Dump config file
+ Serial.println(F("Print config file..."));
+ printFile(filename);
+}
+
+void loop() {
+ // not used in this example
+}
+
+// See also
+// --------
+//
+// https://arduinojson.org/ contains the documentation for all the functions
+// used above. It also includes an FAQ that will help you solve any
+// serialization or deserialization problem.
+//
+// The book "Mastering ArduinoJson" contains a case study of a project that has
+// a complex configuration with nested members.
+// Contrary to this example, the project in the book uses the SPIFFS filesystem.
+// Learn more at https://arduinojson.org/book/
+// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
diff --git a/lib/ArduinoJson-5.11.2/examples/JsonGeneratorExample/JsonGeneratorExample.ino b/lib/ArduinoJson-5.13.4/examples/JsonGeneratorExample/JsonGeneratorExample.ino
similarity index 63%
rename from lib/ArduinoJson-5.11.2/examples/JsonGeneratorExample/JsonGeneratorExample.ino
rename to lib/ArduinoJson-5.13.4/examples/JsonGeneratorExample/JsonGeneratorExample.ino
index 0f636faf8..7b38227b3 100644
--- a/lib/ArduinoJson-5.11.2/examples/JsonGeneratorExample/JsonGeneratorExample.ino
+++ b/lib/ArduinoJson-5.13.4/examples/JsonGeneratorExample/JsonGeneratorExample.ino
@@ -1,23 +1,21 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
+// This example shows how to generate a JSON document with ArduinoJson.
#include
void setup() {
+ // Initialize Serial port
Serial.begin(9600);
- while (!Serial) {
- // wait serial port initialization
- }
+ while (!Serial) continue;
// 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.
- // See https://bblanchon.github.io/ArduinoJson/assistant/
+ // Don't forget to change this value to match your JSON document.
+ // Use arduinojson.org/assistant to compute the capacity.
StaticJsonBuffer<200> jsonBuffer;
// StaticJsonBuffer allocates memory on the stack, it can be
@@ -68,3 +66,16 @@ void setup() {
void loop() {
// not used in this example
}
+
+// See also
+// --------
+//
+// https://arduinojson.org/ contains the documentation for all the functions
+// used above. It also includes an FAQ that will help you solve any
+// serialization problem.
+//
+// The book "Mastering ArduinoJson" contains a tutorial on serialization.
+// It begins with a simple example, like the one above, and then adds more
+// features like serializing directly to a file or an HTTP request.
+// Learn more at https://arduinojson.org/book/
+// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
diff --git a/lib/ArduinoJson-5.13.4/examples/JsonHttpClient/JsonHttpClient.ino b/lib/ArduinoJson-5.13.4/examples/JsonHttpClient/JsonHttpClient.ino
new file mode 100644
index 000000000..4ce1c20d1
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/examples/JsonHttpClient/JsonHttpClient.ino
@@ -0,0 +1,112 @@
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
+// MIT License
+//
+// This example shows how to parse a JSON document in an HTTP response.
+// It uses the Ethernet library, but can be easily adapted for Wifi.
+//
+// It performs a GET resquest on arduinojson.org/example.json
+// Here is the expected response:
+// {
+// "sensor": "gps",
+// "time": 1351824120,
+// "data": [
+// 48.756080,
+// 2.302038
+// ]
+// }
+
+#include
+#include
+#include
+
+void setup() {
+ // Initialize Serial port
+ Serial.begin(9600);
+ while (!Serial) continue;
+
+ // Initialize Ethernet library
+ byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
+ if (!Ethernet.begin(mac)) {
+ Serial.println(F("Failed to configure Ethernet"));
+ return;
+ }
+ delay(1000);
+
+ Serial.println(F("Connecting..."));
+
+ // Connect to HTTP server
+ EthernetClient client;
+ client.setTimeout(10000);
+ if (!client.connect("arduinojson.org", 80)) {
+ Serial.println(F("Connection failed"));
+ return;
+ }
+
+ Serial.println(F("Connected!"));
+
+ // Send HTTP request
+ client.println(F("GET /example.json HTTP/1.0"));
+ client.println(F("Host: arduinojson.org"));
+ client.println(F("Connection: close"));
+ if (client.println() == 0) {
+ Serial.println(F("Failed to send request"));
+ return;
+ }
+
+ // Check HTTP status
+ char status[32] = {0};
+ client.readBytesUntil('\r', status, sizeof(status));
+ if (strcmp(status, "HTTP/1.1 200 OK") != 0) {
+ Serial.print(F("Unexpected response: "));
+ Serial.println(status);
+ return;
+ }
+
+ // Skip HTTP headers
+ char endOfHeaders[] = "\r\n\r\n";
+ if (!client.find(endOfHeaders)) {
+ Serial.println(F("Invalid response"));
+ return;
+ }
+
+ // Allocate JsonBuffer
+ // Use arduinojson.org/assistant to compute the capacity.
+ const size_t capacity = JSON_OBJECT_SIZE(3) + JSON_ARRAY_SIZE(2) + 60;
+ DynamicJsonBuffer jsonBuffer(capacity);
+
+ // Parse JSON object
+ JsonObject& root = jsonBuffer.parseObject(client);
+ if (!root.success()) {
+ Serial.println(F("Parsing failed!"));
+ return;
+ }
+
+ // Extract values
+ Serial.println(F("Response:"));
+ Serial.println(root["sensor"].as());
+ Serial.println(root["time"].as());
+ Serial.println(root["data"][0].as());
+ Serial.println(root["data"][1].as());
+
+ // Disconnect
+ client.stop();
+}
+
+void loop() {
+ // not used in this example
+}
+
+// See also
+// --------
+//
+// https://arduinojson.org/ contains the documentation for all the functions
+// used above. It also includes an FAQ that will help you solve any
+// serialization problem.
+//
+// The book "Mastering ArduinoJson" contains a tutorial on deserialization
+// showing how to parse the response from Yahoo Weather. In the last chapter,
+// it shows how to parse the huge documents from OpenWeatherMap
+// and Weather Underground.
+// Learn more at https://arduinojson.org/book/
+// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
diff --git a/lib/ArduinoJson-5.11.2/examples/JsonParserExample/JsonParserExample.ino b/lib/ArduinoJson-5.13.4/examples/JsonParserExample/JsonParserExample.ino
similarity index 61%
rename from lib/ArduinoJson-5.11.2/examples/JsonParserExample/JsonParserExample.ino
rename to lib/ArduinoJson-5.13.4/examples/JsonParserExample/JsonParserExample.ino
index 719d2ee28..6c16211b5 100644
--- a/lib/ArduinoJson-5.11.2/examples/JsonParserExample/JsonParserExample.ino
+++ b/lib/ArduinoJson-5.13.4/examples/JsonParserExample/JsonParserExample.ino
@@ -1,23 +1,21 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
+// This example shows how to deserialize a JSON document with ArduinoJson.
#include
void setup() {
+ // Initialize serial port
Serial.begin(9600);
- while (!Serial) {
- // wait serial port initialization
- }
+ while (!Serial) continue;
// 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.
- // See https://bblanchon.github.io/ArduinoJson/assistant/
+ // Inside the brackets, 200 is the size of the pool in bytes.
+ // Don't forget to change this value to match your JSON document.
+ // Use arduinojson.org/assistant to compute the capacity.
StaticJsonBuffer<200> jsonBuffer;
// StaticJsonBuffer allocates memory on the stack, it can be
@@ -65,3 +63,16 @@ void setup() {
void loop() {
// not used in this example
}
+
+// See also
+// --------
+//
+// https://arduinojson.org/ contains the documentation for all the functions
+// used above. It also includes an FAQ that will help you solve any
+// deserialization problem.
+//
+// The book "Mastering ArduinoJson" contains a tutorial on deserialization.
+// It begins with a simple example, like the one above, and then adds more
+// features like deserializing directly from a file or an HTTP request.
+// Learn more at https://arduinojson.org/book/
+// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
diff --git a/lib/ArduinoJson-5.13.4/examples/JsonServer/JsonServer.ino b/lib/ArduinoJson-5.13.4/examples/JsonServer/JsonServer.ino
new file mode 100644
index 000000000..e693ae176
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/examples/JsonServer/JsonServer.ino
@@ -0,0 +1,109 @@
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
+// MIT License
+//
+// This example shows how to implement an HTTP server that sends JSON document
+// in the responses.
+// It uses the Ethernet library but can be easily adapted for Wifi.
+//
+// It sends the value of the analog and digital pins.
+// The JSON document looks like the following:
+// {
+// "analog": [ 0, 1, 2, 3, 4, 5 ],
+// "digital": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 ]
+// }
+
+#include
+#include
+#include
+
+byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
+EthernetServer server(80);
+
+void setup() {
+ // Initialize serial port
+ Serial.begin(9600);
+ while (!Serial) continue;
+
+ // Initialize Ethernet libary
+ if (!Ethernet.begin(mac)) {
+ Serial.println(F("Failed to initialize Ethernet library"));
+ return;
+ }
+
+ // Start to listen
+ server.begin();
+
+ Serial.println(F("Server is ready."));
+ Serial.print(F("Please connect to http://"));
+ Serial.println(Ethernet.localIP());
+}
+
+void loop() {
+ // Wait for an incomming connection
+ EthernetClient client = server.available();
+
+ // Do we have a client?
+ if (!client) return;
+
+ Serial.println(F("New client"));
+
+ // Read the request (we ignore the content in this example)
+ while (client.available()) client.read();
+
+ // Allocate JsonBuffer
+ // Use arduinojson.org/assistant to compute the capacity.
+ StaticJsonBuffer<500> jsonBuffer;
+
+ // Create the root object
+ JsonObject& root = jsonBuffer.createObject();
+
+ // Create the "analog" array
+ JsonArray& analogValues = root.createNestedArray("analog");
+ for (int pin = 0; pin < 6; pin++) {
+ // Read the analog input
+ int value = analogRead(pin);
+
+ // Add the value at the end of the array
+ analogValues.add(value);
+ }
+
+ // Create the "digital" array
+ JsonArray& digitalValues = root.createNestedArray("digital");
+ for (int pin = 0; pin < 14; pin++) {
+ // Read the digital input
+ int value = digitalRead(pin);
+
+ // Add the value at the end of the array
+ digitalValues.add(value);
+ }
+
+ Serial.print(F("Sending: "));
+ root.printTo(Serial);
+ Serial.println();
+
+ // Write response headers
+ client.println("HTTP/1.0 200 OK");
+ client.println("Content-Type: application/json");
+ client.println("Connection: close");
+ client.println();
+
+ // Write JSON document
+ root.prettyPrintTo(client);
+
+ // Disconnect
+ client.stop();
+}
+
+// See also
+// --------
+//
+// https://arduinojson.org/ contains the documentation for all the functions
+// used above. It also includes an FAQ that will help you solve any
+// serialization problem.
+//
+// The book "Mastering ArduinoJson" contains a tutorial on serialization.
+// It begins with a simple example, then adds more features like serializing
+// directly to a file or an HTTP client.
+// Learn more at https://arduinojson.org/book/
+// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
diff --git a/lib/ArduinoJson-5.13.4/examples/JsonUdpBeacon/JsonUdpBeacon.ino b/lib/ArduinoJson-5.13.4/examples/JsonUdpBeacon/JsonUdpBeacon.ino
new file mode 100644
index 000000000..b2328a62d
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/examples/JsonUdpBeacon/JsonUdpBeacon.ino
@@ -0,0 +1,101 @@
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
+// MIT License
+//
+// This example shows how to send a JSON document to a UDP socket.
+// At regular interval, it sends a UDP packet that contains the status of
+// analog and digital pins.
+// The JSON document looks like the following:
+// {
+// "analog": [ 0, 1, 2, 3, 4, 5 ],
+// "digital": [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 ]
+// }
+//
+// If you want to test this program, you need to be able to receive the UDP
+// packets.
+// For example, you can run netcat on your computer
+// $ ncat -ulp 8888
+// See https://nmap.org/ncat/
+
+#include
+#include
+#include
+
+byte mac[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED};
+IPAddress remoteIp(192, 168, 0, 108); // <- EDIT!!!!
+unsigned short remotePort = 8888;
+unsigned short localPort = 8888;
+EthernetUDP udp;
+
+void setup() {
+ // Initialize serial port
+ Serial.begin(9600);
+ while (!Serial) continue;
+
+ // Initialize Ethernet libary
+ if (!Ethernet.begin(mac)) {
+ Serial.println(F("Failed to initialize Ethernet library"));
+ return;
+ }
+
+ // Enable UDP
+ udp.begin(localPort);
+}
+
+void loop() {
+ // Allocate JsonBuffer
+ // Use arduinojson.org/assistant to compute the capacity.
+ StaticJsonBuffer<500> jsonBuffer;
+
+ // Create the root object
+ JsonObject& root = jsonBuffer.createObject();
+
+ // Create the "analog" array
+ JsonArray& analogValues = root.createNestedArray("analog");
+ for (int pin = 0; pin < 6; pin++) {
+ // Read the analog input
+ int value = analogRead(pin);
+
+ // Add the value at the end of the array
+ analogValues.add(value);
+ }
+
+ // Create the "digital" array
+ JsonArray& digitalValues = root.createNestedArray("digital");
+ for (int pin = 0; pin < 14; pin++) {
+ // Read the digital input
+ int value = digitalRead(pin);
+
+ // Add the value at the end of the array
+ digitalValues.add(value);
+ }
+
+ // Log
+ Serial.print(F("Sending to "));
+ Serial.print(remoteIp);
+ Serial.print(F(" on port "));
+ Serial.println(remotePort);
+ root.printTo(Serial);
+
+ // Send UDP packet
+ udp.beginPacket(remoteIp, remotePort);
+ root.printTo(udp);
+ udp.println();
+ udp.endPacket();
+
+ // Wait
+ delay(10000);
+}
+
+// See also
+// --------
+//
+// https://arduinojson.org/ contains the documentation for all the functions
+// used above. It also includes an FAQ that will help you solve any
+// serialization problem.
+//
+// The book "Mastering ArduinoJson" contains a tutorial on serialization.
+// It begins with a simple example, then adds more features like serializing
+// directly to a file or any stream.
+// Learn more at https://arduinojson.org/book/
+// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
diff --git a/lib/ArduinoJson-5.11.2/examples/ProgmemExample/ProgmemExample.ino b/lib/ArduinoJson-5.13.4/examples/ProgmemExample/ProgmemExample.ino
similarity index 52%
rename from lib/ArduinoJson-5.11.2/examples/ProgmemExample/ProgmemExample.ino
rename to lib/ArduinoJson-5.13.4/examples/ProgmemExample/ProgmemExample.ino
index 195b014fb..ddde8fd1d 100644
--- a/lib/ArduinoJson-5.11.2/examples/ProgmemExample/ProgmemExample.ino
+++ b/lib/ArduinoJson-5.13.4/examples/ProgmemExample/ProgmemExample.ino
@@ -1,21 +1,19 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
+// This example shows the different ways you can use Flash strings with
+// ArduinoJson.
+//
+// Use Flash strings sparingly, because ArduinoJson duplicates them in the
+// JsonBuffer. Prefer plain old char*, as they are more efficient in term of
+// code size, speed, and memory usage.
#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
+#ifdef PROGMEM // <- check that Flash strings are supported
+
DynamicJsonBuffer jsonBuffer;
// You can use a Flash String as your JSON input.
@@ -39,6 +37,9 @@ void setup() {
// JsonBuffer.
root["sensor"] = F("gps");
+ // It works with RawJson too:
+ root["sensor"] = RawJson(F("\"gps\""));
+
// You can compare the content of a JsonVariant to a Flash String
if (root["sensor"] == F("gps")) {
// ...
@@ -54,3 +55,16 @@ void setup() {
void loop() {
// not used in this example
}
+
+// See also
+// --------
+//
+// https://arduinojson.org/ contains the documentation for all the functions
+// used above. It also includes an FAQ that will help you solve any memory
+// problem.
+//
+// The book "Mastering ArduinoJson" contains a quick C++ course that explains
+// how your microcontroller stores strings in memory. It also tells why you
+// should not abuse Flash strings with ArduinoJson.
+// Learn more at https://arduinojson.org/book/
+// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
diff --git a/lib/ArduinoJson-5.11.2/examples/StringExample/StringExample.ino b/lib/ArduinoJson-5.13.4/examples/StringExample/StringExample.ino
similarity index 67%
rename from lib/ArduinoJson-5.11.2/examples/StringExample/StringExample.ino
rename to lib/ArduinoJson-5.13.4/examples/StringExample/StringExample.ino
index 50b8db6ec..fc7503d0e 100644
--- a/lib/ArduinoJson-5.11.2/examples/StringExample/StringExample.ino
+++ b/lib/ArduinoJson-5.13.4/examples/StringExample/StringExample.ino
@@ -1,19 +1,15 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
+// This example shows the different ways you can use String with ArduinoJson.
+//
+// Use String objects sparingly, because ArduinoJson duplicates them in the
+// JsonBuffer. Prefer plain old char[], as they are more efficient in term of
+// code size, speed, and memory usage.
#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;
@@ -44,6 +40,9 @@ void setup() {
// WARNING: the content of the String will be duplicated in the JsonBuffer.
root["sensor"] = sensor;
+ // It works with RawJson too:
+ root["sensor"] = RawJson(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";
@@ -61,3 +60,15 @@ void setup() {
void loop() {
// not used in this example
}
+
+// See also
+// --------
+//
+// https://arduinojson.org/ contains the documentation for all the functions
+// used above. It also includes an FAQ that will help you solve any problem.
+//
+// The book "Mastering ArduinoJson" contains a quick C++ course that explains
+// how your microcontroller stores strings in memory. On several occasions, it
+// shows how you can avoid String in your program.
+// Learn more at https://arduinojson.org/book/
+// Use the coupon code TWENTY for a 20% discount ❤❤❤❤❤
diff --git a/lib/ArduinoJson-5.11.2/keywords.txt b/lib/ArduinoJson-5.13.4/keywords.txt
similarity index 100%
rename from lib/ArduinoJson-5.11.2/keywords.txt
rename to lib/ArduinoJson-5.13.4/keywords.txt
diff --git a/lib/ArduinoJson-5.13.4/library.properties b/lib/ArduinoJson-5.13.4/library.properties
new file mode 100644
index 000000000..67ccbb95e
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/library.properties
@@ -0,0 +1,11 @@
+name=ArduinoJson
+version=5.13.4
+author=Benoit Blanchon
+maintainer=Benoit Blanchon
+sentence=An efficient and elegant JSON library for Arduino.
+paragraph=ArduinoJson supports ✔ serialization, ✔ deserialization, ✔ fixed allocation, ✔ zero-copy, ✔ streams, and more. It is the most popular Arduino library on GitHub ❤❤❤❤❤. Check out arduinojson.org for a comprehensive documentation.
+category=Data Processing
+url=https://arduinojson.org/?utm_source=meta&utm_medium=library.properties
+architectures=*
+repository=https://github.com/bblanchon/ArduinoJson.git
+license=MIT
diff --git a/lib/ArduinoJson-5.13.4/src/ArduinoJson.h b/lib/ArduinoJson-5.13.4/src/ArduinoJson.h
new file mode 100644
index 000000000..3782aeabc
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson.h
@@ -0,0 +1,17 @@
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
+// MIT License
+
+#pragma once
+
+#ifdef __cplusplus
+
+#include "ArduinoJson.hpp"
+
+using namespace ArduinoJson;
+
+#else
+
+#error ArduinoJson requires a C++ compiler, please change file extension to .cc or .cpp
+
+#endif
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson.hpp
similarity index 75%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson.hpp
index 949fa5ca0..c493c06a9 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson.hpp
@@ -1,12 +1,11 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
+#include "ArduinoJson/version.hpp"
+
#include "ArduinoJson/DynamicJsonBuffer.hpp"
#include "ArduinoJson/JsonArray.hpp"
#include "ArduinoJson/JsonObject.hpp"
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Configuration.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Configuration.hpp
similarity index 94%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Configuration.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Configuration.hpp
index a1015a6f3..82483adfa 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Configuration.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Configuration.hpp
@@ -1,15 +1,13 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
// Small or big machine?
#ifndef ARDUINOJSON_EMBEDDED_MODE
-#if defined(ARDUINO) || defined(__IAR_SYSTEMS_ICC__)
+#if defined(ARDUINO) || defined(__IAR_SYSTEMS_ICC__) || defined(__XC) || \
+ defined(__ARMCC_VERSION)
#define ARDUINOJSON_EMBEDDED_MODE 1
#else
#define ARDUINOJSON_EMBEDDED_MODE 0
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/Encoding.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/Encoding.hpp
similarity index 80%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/Encoding.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/Encoding.hpp
index dba785aae..a0efa2c74 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/Encoding.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/Encoding.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonBufferAllocated.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonBufferAllocated.hpp
similarity index 68%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonBufferAllocated.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonBufferAllocated.hpp
index ff74adc55..443aae4df 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonBufferAllocated.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonBufferAllocated.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonFloat.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonFloat.hpp
similarity index 56%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonFloat.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonFloat.hpp
index a4a8e937f..0ed42140f 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonFloat.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonFloat.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonInteger.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonInteger.hpp
similarity index 70%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonInteger.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonInteger.hpp
index 574a5e109..c8ddd00b4 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonInteger.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonInteger.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantAs.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantAs.hpp
similarity index 80%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantAs.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantAs.hpp
index 3f19fd23a..8f202c5eb 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantAs.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantAs.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantContent.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantContent.hpp
similarity index 79%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantContent.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantContent.hpp
index b27716299..c525a6060 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantContent.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantContent.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantDefault.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantDefault.hpp
similarity index 68%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantDefault.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantDefault.hpp
index a59fd46c9..57ecc83ee 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantDefault.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantDefault.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantType.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantType.hpp
similarity index 84%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantType.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantType.hpp
index ba6a24999..21f890e52 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/JsonVariantType.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/JsonVariantType.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/List.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/List.hpp
similarity index 93%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/List.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/List.hpp
index 8a24666ec..506308cc3 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/List.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/List.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListConstIterator.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListConstIterator.hpp
similarity index 85%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListConstIterator.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListConstIterator.hpp
index bce1bfa5e..a6af685e5 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListConstIterator.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListConstIterator.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListIterator.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListIterator.hpp
similarity index 86%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListIterator.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListIterator.hpp
index a491866f0..01fa287f7 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListIterator.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListIterator.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListNode.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListNode.hpp
similarity index 70%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListNode.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListNode.hpp
index 712e15e1f..c0907120e 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ListNode.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ListNode.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/NonCopyable.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/NonCopyable.hpp
similarity index 67%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/NonCopyable.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/NonCopyable.hpp
index 98ebd8fb3..73f3d8edb 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/NonCopyable.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/NonCopyable.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ReferenceType.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ReferenceType.hpp
similarity index 74%
rename from lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ReferenceType.hpp
rename to lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ReferenceType.hpp
index bbc9046be..1e491172f 100644
--- a/lib/ArduinoJson-5.11.2/src/ArduinoJson/Data/ReferenceType.hpp
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ReferenceType.hpp
@@ -1,9 +1,6 @@
-// Copyright Benoit Blanchon 2014-2017
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
// MIT License
-//
-// Arduino JSON library
-// https://bblanchon.github.io/ArduinoJson/
-// If you like this project, please add a star!
#pragma once
diff --git a/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ValueSaver.hpp b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ValueSaver.hpp
new file mode 100644
index 000000000..9750f1ac5
--- /dev/null
+++ b/lib/ArduinoJson-5.13.4/src/ArduinoJson/Data/ValueSaver.hpp
@@ -0,0 +1,52 @@
+// ArduinoJson - arduinojson.org
+// Copyright Benoit Blanchon 2014-2018
+// MIT License
+
+#pragma once
+
+#include "../JsonBuffer.hpp"
+#include "../JsonVariant.hpp"
+#include "../StringTraits/StringTraits.hpp"
+#include "../TypeTraits/EnableIf.hpp"
+
+namespace ArduinoJson {
+namespace Internals {
+
+template
+struct ValueSaver {
+ template
+ static bool save(JsonBuffer*, Destination& destination, Source source) {
+ destination = source;
+ return true;
+ }
+};
+
+template
+struct ValueSaver<
+ Source, typename EnableIf::should_duplicate>::type> {
+ template
+ static bool save(JsonBuffer* buffer, Destination& dest, Source source) {
+ if (!StringTraits