ArduinoJson 6.14.0 * Added `BasicJsonDocument::shrinkToFit()` * Added support of `uint8_t` for `serializeJson()`, `serializeJsonPretty()`, and `serializeMsgPack()` (issue #1142) * Added `ARDUINOJSON_ENABLE_COMMENTS` to enable support for comments (defaults to 0) * Auto enable support for `std::string` and `std::stream` on modern compilers (issue #1156)
Looking for a human-readable version?
📰 Read the article on arduinojson.org
Changes since 6.13.0
- Added
BasicJsonDocument::shrinkToFit() - Added support of
uint8_tforserializeJson(),serializeJsonPretty(), andserializeMsgPack()(issue #1142) - Added
ARDUINOJSON_ENABLE_COMMENTSto enable support for comments (defaults to 0) - Auto enable support for
std::stringandstd::streamon modern compilers (issue #1156) (No need to defineARDUINOJSON_ENABLE_STD_STRINGandARDUINOJSON_ENABLE_STD_STREAManymore) - Improved decoding of UTF-16 surrogate pairs (PR #1157 by @kaysievers) (ArduinoJson now produces standard UTF-8 instead of CESU-8)
- Added
measureJson,measureJsonPretty, andmeasureMsgPacktokeywords.txt(This file is used for syntax highlighting in the Arduino IDE) - Fixed
variant.is<nullptr_t>() - Fixed value returned by
serializeJson(),serializeJsonPretty(), andserializeMsgPack()when writing to aString - Improved speed of
serializeJson(),serializeJsonPretty(), andserializeMsgPack()when writing to aString
BREAKING CHANGES
⚠ ️Support for comments in input is now optional and disabled by default.
If you need support for comments, you must defined
ARDUINOJSON_ENABLE_COMMENTSto1; otherwise, you'll receiveInvalidInputerrors.#define ARDUINOJSON_ENABLE_COMMENTS 1 #include <ArduinoJson.h>
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v6.14.0.hput it in your project folder - Download
ArduinoJson-v6.14.0.zipand extract it in youlibrariesfolder
Note: ArduinoJson-v6.14.0.h and ArduinoJson-v6.14.0.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.