2015-05-23 15:32:50 +02:00
ArduinoJson: change log
=======================
2022-04-07 20:58:54 +02:00
HEAD
----
2022-04-27 15:06:58 +02:00
* Add `JsonVariant::link()` (issue #1343 )
2022-04-07 20:58:54 +02:00
* Fix `9.22337e+18 is outside the range of representable values of type 'long'`
2022-06-09 21:06:32 +02:00
* Fix comparison operators for `JsonArray` and `JsonArrayConst`
2022-04-07 20:58:54 +02:00
2022-04-05 10:53:11 +02:00
v6.19.4 (2022-04-05)
-------
2022-03-19 12:11:40 +01:00
* Add `ElementProxy::memoryUsage()`
* Add `MemberProxy::memoryUsage()` (issue #1730 )
2022-03-23 16:00:24 +01:00
* Add implicit conversion from `JsonDocument` to `JsonVariant`
2022-04-05 10:12:17 +02:00
* Fix comparisons operators with `const JsonDocument&`
2022-03-19 12:11:40 +01:00
2022-03-08 17:24:14 +01:00
v6.19.3 (2022-03-08)
-------
2022-02-17 10:47:42 +01:00
* Fix `call of overloaded 'String(const char*, int)' is ambiguous`
2022-02-17 11:16:05 +01:00
* Fix `JsonString` operator `==` and `!=` for non-zero-terminated string
2022-02-25 09:23:51 +01:00
* Fix `-Wsign-conversion` on GCC 8 (issue #1715 )
2022-02-28 18:00:43 +01:00
* MessagePack: serialize round floats as integers (issue #1718 )
2022-02-17 10:47:42 +01:00
2022-02-14 09:06:06 +01:00
v6.19.2 (2022-02-14)
-------
2022-02-06 11:14:23 +01:00
* Fix `cannot convert 'pgm_p' to 'const void*'` (issue #1707 )
2022-01-14 08:49:57 +01:00
v6.19.1 (2022-01-14)
-------
2022-01-13 11:52:29 +01:00
* Fix crash when adding an object member in a too small `JsonDocument`
2022-01-13 16:12:56 +01:00
* Fix filter not working in zero-copy mode (issue #1697 )
2022-01-13 11:52:29 +01:00
2022-01-08 16:21:29 +01:00
v6.19.0 (2022-01-08)
-------
2021-10-18 15:24:45 +02:00
* Remove `ARDUINOJSON_EMBEDDED_MODE` and assume we run on an embedded platform.
Dependent settings (like `ARDUINOJSON_DEFAULT_NESTING_LIMIT` ) must be set individually.
2021-10-19 20:10:47 +02:00
* Change the default of `ARDUINOJSON_USE_DOUBLE` to `1`
2021-10-18 16:23:59 +02:00
* Change the default of `ARDUINOJSON_USE_LONG_LONG` to `1` on 32-bit platforms
2021-10-24 09:58:20 +02:00
* Add `as<JsonString>()` and `is<JsonString>()`
2021-10-22 17:19:14 +02:00
* Add safe bool idiom in `JsonString`
2021-12-14 10:42:01 +01:00
* Add support for NUL in string values (issue #1646 )
2021-12-20 17:51:27 +01:00
* Add support for arbitrary array rank in `copyArray()`
2021-12-20 13:18:31 +01:00
* Add support for `char[][]` in `copyArray()`
2021-10-23 16:12:58 +02:00
* Remove `DeserializationError == bool` and `DeserializationError != bool`
2021-12-16 14:55:26 +01:00
* Renamed undocumented function `isUndefined()` to `isUnbound()`
2021-11-12 16:55:41 +01:00
* Fix `JsonVariant::memoryUsage()` for raw strings
2021-11-23 10:47:31 +01:00
* Fix `call of overloaded 'swap(BasicJsonDocument&, BasicJsonDocument&)' is ambiguous` (issue #1678 )
2021-12-16 14:28:30 +01:00
* Fix inconsistent pool capacity between `BasicJsonDocument` 's copy and move constructors
* Fix inconsistent pool capacity between `BasicJsonDocument` 's copy and move assignments
2021-12-14 10:41:25 +01:00
* Fix return type of `StaticJsonDocument::operator=`
2021-12-16 14:55:26 +01:00
* Avoid pool reallocation in `BasicJsonDocument` 's copy assignment if capacity is the same
2021-12-26 18:19:35 +01:00
* Avoid including `Arduino.h` when all its features are disabled (issue #1692 , PR #1693 by @paulocsanz )
2021-12-29 10:29:30 +01:00
* Assume `PROGMEM` is available as soon as `ARDUINO` is defined (consequence of #1693 )
2021-12-26 18:19:35 +01:00
2021-09-28 17:18:44 +02:00
v6.18.5 (2021-09-28)
-------
2021-09-28 15:58:18 +02:00
* Set `ARDUINOJSON_EMBEDDED_MODE` to `1` on Nios II (issue #1657 )
2021-09-06 09:11:22 +02:00
v6.18.4 (2021-09-06)
-------
2021-08-03 09:04:14 +00:00
* Fixed error `'dummy' may be used uninitialized` on GCC 11
2021-08-03 11:39:02 +02:00
* Fixed error `expected unqualified-id before 'const'` on GCC 11 (issue #1622 )
2021-08-13 10:35:04 +02:00
* Filter: exact match takes precedence over wildcard (issue #1628 )
2021-08-31 13:58:27 +02:00
* Fixed deserialization of `\u0000` (issue #1646 )
2021-08-03 09:04:14 +00:00
2021-07-27 15:44:36 +02:00
v6.18.3 (2021-07-27)
-------
2021-07-23 13:23:48 +02:00
* Changed return type of `convertToJson()` and `Converter<T>::toJson()` to `void`
2021-07-27 14:15:05 +02:00
* Added `as<std::string_view>()` and `is<std::string_view>()`
2021-07-23 13:23:48 +02:00
2021-07-19 10:11:21 +02:00
v6.18.2 (2021-07-19)
-------
2021-07-15 12:30:45 +02:00
* Removed a symlink because the Arduino Library Specification forbids it
2021-07-03 16:03:01 +02:00
v6.18.1 (2021-07-03)
-------
2021-05-19 15:01:51 +02:00
* Fixed support for `volatile float` and `volatile double` (issue #1557 )
2021-05-19 15:07:59 +02:00
* Fixed error `[Pe070]: incomplete type is not allowed` on IAR (issue #1560 )
2021-05-28 09:02:48 +02:00
* Fixed `serializeJson(doc, String)` when allocation fails (issue #1572 )
2021-06-04 11:39:19 +02:00
* Fixed clang-tidy warnings (issue #1574 , PR #1577 by @armandas )
2021-06-11 11:46:20 +02:00
* Added fake class `InvalidConversion<T1,T2>` to easily identify invalid conversions (issue #1585 )
2021-06-17 20:27:47 +02:00
* Added support for `std::string_view` (issue #1578 , PR #1554 by @0xFEEDC0DE64 )
2021-06-17 17:31:32 +00:00
* Fixed warning `definition of implicit copy constructor for 'MsgPackDeserializer' is deprecated because it has a user-declared copy assignment operator`
2021-06-26 11:23:40 +02:00
* Added `JsonArray::clear()` (issue #1597 )
2021-06-30 09:17:28 +02:00
* Fixed `JsonVariant::as<unsigned>()` (issue #1601 )
2021-06-25 13:49:11 +02:00
* Added support for ESP-IDF component build (PR #1562 by @qt1 , PR #1599 by @andreaskuster )
2021-05-19 15:01:51 +02:00
2021-05-05 20:41:35 +02:00
v6.18.0 (2021-05-05)
-------
2021-02-18 08:48:10 +01:00
2021-03-20 14:52:47 +01:00
* Added support for custom converters (issue #687 )
2021-03-27 14:35:15 +01:00
* Added support for `Printable` (issue #1444 )
2021-02-07 11:40:14 +01:00
* Removed support for `char` values, see below (issue #1498 )
2021-02-18 19:40:11 +01:00
* `deserializeJson()` leaves `\uXXXX` unchanged instead of returning `NotSupported`
2021-02-18 19:26:11 +01:00
* `deserializeMsgPack()` inserts `null` instead of returning `NotSupported`
2021-02-18 19:30:04 +01:00
* Removed `DeserializationError::NotSupported`
2021-02-23 08:33:28 +01:00
* Added `JsonVariant::is<JsonArrayConst/JsonObjectConst>()` (issue #1412 )
2021-02-23 08:41:24 +01:00
* Added `JsonVariant::is<JsonVariant/JsonVariantConst>()` (issue #1412 )
2021-02-23 08:58:52 +01:00
* Changed `JsonVariantConst::is<JsonArray/JsonObject>()` to return `false` (issue #1412 )
2021-03-08 09:58:09 +01:00
* Simplified `JsonVariant::as<T>()` to always return `T` (see below)
2021-03-31 09:56:51 +02:00
* Updated folders list in `.mbedignore` (PR #1515 by @AGlass0fMilk )
2021-04-15 11:30:56 +02:00
* Fixed member-call-on-null-pointer in `getMember()` when array is empty
2021-04-29 20:59:15 +02:00
* `serializeMsgPack(doc, buffer, size)` doesn't add null-terminator anymore (issue #1545 )
* `serializeJson(doc, buffer, size)` adds null-terminator only if there is enough room
2021-05-01 08:11:34 -04:00
* PlatformIO: set `build.libArchive` to `false` (PR #1550 by @askreet )
2021-02-18 08:48:10 +01:00
2021-02-07 11:40:14 +01:00
> ### BREAKING CHANGES
2021-02-18 08:48:10 +01:00
>
2021-03-08 09:58:09 +01:00
> #### Support for `char` removed
>
2021-02-18 08:48:10 +01:00
> We cannot cast a `JsonVariant` to a `char` anymore, so the following will break:
> ```c++
> char age = doc["age"]; // error: no matching function for call to 'variantAs(VariantData*&)'
> ```
> Instead, you must use another integral type, such as `int8_t`:
> ```c++
> int8_t age = doc["age"]; // OK
> ```
2021-02-07 11:40:14 +01:00
>
> Similarly, we cannot assign from a `char` anymore, so the following will break:
> ```c++
> char age;
> doc["age"] = age; // error: no matching function for call to 'VariantRef::set(const char&)'
> ```
> Instead, you must use another integral type, such as `int8_t`:
> ```c++
> int8_t age;
> doc["age"] = age; // OK
> ```
2021-05-04 14:48:51 +02:00
> A deprecation warning with the message "Support for `char` is deprecated, use `int8_t` or `uint8_t` instead" was added to allow a smooth transition.
2021-02-18 19:30:04 +01:00
>
2021-03-08 09:58:09 +01:00
> #### `as<T>()` always returns `T`
>
> Previously, `JsonVariant::as<T>()` could return a type different from `T`.
> The most common example is `as<char*>()` that returned a `const char*`.
> While this feature simplified a few use cases, it was confusing and complicated the
> implementation of custom converters.
>
> Starting from this version, `as<T>` doesn't try to auto-correct the return type and always return `T`,
> which means that you cannot write this anymore:
>
> ```c++
> Serial.println(doc["sensor"].as<char*>()); // error: invalid conversion from 'const char*' to 'char*' [-fpermissive]
> ```
>
> Instead, you must write:
>
> ```c++
> Serial.println(doc["sensor"].as<const char*>()); // OK
> ```
>
2021-04-26 08:42:33 +02:00
> A deprecation warning with the message "Replace `as<char*>()` with `as<const char*>()`" was added to allow a smooth transition.
2021-03-08 09:58:09 +01:00
>
> #### `DeserializationError::NotSupported` removed
>
2021-02-18 19:30:04 +01:00
> On a different topic, `DeserializationError::NotSupported` has been removed.
> Instead of returning this error:
>
> * `deserializeJson()` leaves `\uXXXX` unchanged (only when `ARDUINOJSON_DECODE_UNICODE` is `0`)
> * `deserializeMsgPack()` replaces unsupported values with `null`s
2021-02-23 08:58:52 +01:00
>
2021-03-08 09:58:09 +01:00
> #### Const-aware `is<T>()`
>
> Lastly, a very minor change concerns `JsonVariantConst::is<T>()`.
2021-02-23 08:58:52 +01:00
> It used to return `true` for `JsonArray` and `JsonOject`, but now it returns `false`.
> Instead, you must use `JsonArrayConst` and `JsonObjectConst`.
2021-02-18 08:48:10 +01:00
2021-02-15 09:53:10 +01:00
v6.17.3 (2021-02-15)
-------
2021-01-27 09:59:51 +01:00
* Made `JsonDocument` 's destructor protected (issue #1480 )
2021-02-01 09:16:23 +01:00
* Added missing calls to `client.stop()` in `JsonHttpClient.ino` (issue #1485 )
2021-02-02 10:08:10 +01:00
* Fixed error `expected ')' before 'char'` when `isdigit()` is a macro (issue #1487 )
2021-02-03 10:20:46 +01:00
* Fixed error `definition of implicit copy constructor is deprecated` on Clang 10
2021-02-15 09:49:56 +01:00
* PlatformIO: set framework compatibility to `*` (PR #1490 by @maxgerhardt )
2021-01-27 09:59:51 +01:00
2020-11-14 10:38:21 +01:00
v6.17.2 (2020-11-14)
-------
2020-11-09 09:13:12 +01:00
* Fixed invalid conversion error in `operator|(JsonVariant, char*)` (issue #1432 )
2020-11-10 14:58:31 +01:00
* Changed the default value of `ARDUINOJSON_ENABLE_PROGMEM` (issue #1433 ).
It now checks that the `pgm_read_XXX` macros are defined before enabling `PROGMEM` .
2020-11-09 09:13:12 +01:00
2020-11-07 10:11:41 +01:00
v6.17.1 (2020-11-07)
-------
2020-10-22 09:30:31 +02:00
* Fixed error `ambiguous overload for 'operator|'` (issue #1411 )
2020-10-23 10:22:14 +02:00
* Fixed `operator|(MemberProxy, JsonObject)` (issue #1415 )
2020-10-28 09:23:26 +01:00
* Allowed more than 32767 values in non-embedded mode (issue #1414 )
2020-10-22 09:30:31 +02:00
2020-10-19 11:35:09 +02:00
v6.17.0 (2020-10-19)
-------
2020-08-23 09:29:40 +02:00
* Added a build failure when nullptr is defined as a macro (issue #1355 )
2020-09-05 10:54:46 +02:00
* Added `JsonDocument::overflowed()` which tells if the memory pool was too small (issue #1358 )
2020-09-13 10:27:29 +02:00
* Added `DeserializationError::EmptyInput` which tells if the input was empty
2020-09-14 09:30:58 +02:00
* Added `DeserializationError::f_str()` which returns a `const __FlashStringHelper*` (issue #846 )
2020-09-26 14:48:17 +02:00
* Added `operator|(JsonVariantConst, JsonVariantConst)`
2020-10-13 09:40:39 +02:00
* Added filtering for MessagePack (issue #1298 , PR #1394 by Luca Passarella)
2020-09-19 09:37:05 +02:00
* Moved float convertion tables to PROGMEM
2020-09-05 17:33:47 +02:00
* Fixed `JsonVariant::set((char*)0)` which returned false instead of true (issue #1368 )
2020-09-16 10:29:20 +02:00
* Fixed error `No such file or directory #include <WString.h>` (issue #1381 )
2020-08-23 09:29:40 +02:00
2020-08-04 10:33:38 +02:00
v6.16.1 (2020-08-04)
-------
2020-08-04 09:52:42 +02:00
* Fixed `deserializeJson()` that stopped reading after `{}` (issue #1335 )
2020-08-01 15:17:39 +02:00
v6.16.0 (2020-08-01)
-------
2020-07-02 15:28:34 +02:00
* Added comparisons (`>` , `>=` , `==` , `!=` , `<` , and `<=` ) between `JsonVariant` s
2020-07-21 20:15:31 +02:00
* Added string deduplication (issue #1303 )
2020-07-30 09:40:35 +02:00
* Added `JsonString::operator!=`
2020-09-28 21:11:38 +02:00
* Added wildcard key (`*` ) for filters (issue #1309 )
2020-07-30 09:49:09 +02:00
* Set `ARDUINOJSON_DECODE_UNICODE` to `1` by default
2020-07-22 20:38:09 +02:00
* Fixed `copyArray()` not working with `String` , `ElementProxy` , and `MemberProxy`
2020-07-23 10:58:47 +02:00
* Fixed error `getOrAddElement is not a member of ElementProxy` (issue #1311 )
2020-07-26 16:09:03 +02:00
* Fixed excessive stack usage when compiled with `-Og` (issues #1210 and #1314 )
2020-07-28 17:07:22 +10:00
* Fixed `Warning[Pa093]: implicit conversion from floating point to integer` on IAR compiler (PR #1328 by @stawiski )
2020-07-02 15:28:34 +02:00
2020-05-15 09:26:25 +02:00
v6.15.2 (2020-05-15)
-------
2020-04-11 12:25:38 +02:00
* CMake: don't build tests when imported in another project
2020-04-11 18:11:52 +02:00
* CMake: made project arch-independent
2020-04-28 09:11:46 +02:00
* Visual Studio: fixed error C2766 with flag `/Zc:__cplusplus` (issue #1250 )
2020-05-02 10:00:08 +02:00
* Added support for `JsonDocument` to `copyArray()` (issue #1255 )
2020-05-04 09:09:57 +02:00
* Added support for `enum` s in `as<T>()` and `is<T>()` (issue #1256 )
2020-05-05 13:16:32 +02:00
* Added `JsonVariant` as an input type for `deserializeXxx()`
For example, you can do: `deserializeJson(doc2, doc1["payload"])`
2020-05-12 18:53:26 +02:00
* Break the build if using 64-bit integers with ARDUINOJSON_USE_LONG_LONG==0
2020-04-11 12:25:38 +02:00
2020-04-08 18:23:27 +02:00
v6.15.1 (2020-04-08)
-------
2020-03-25 08:37:57 +01:00
* Fixed "maybe-uninitialized" warning (issue #1217 )
2020-04-06 18:19:32 +02:00
* Fixed "statement is unreachable" warning on IAR (issue #1233 )
2020-04-06 18:20:12 +02:00
* Fixed "pointless integer comparison" warning on IAR (issue #1233 )
2020-04-07 21:43:10 +02:00
* Added CMake "install" target (issue #1209 )
2020-04-08 10:16:05 +02:00
* Disabled alignment on AVR (issue #1231 )
2020-03-25 08:37:57 +01:00
2020-03-22 21:02:38 +01:00
v6.15.0 (2020-03-22)
-------
2020-02-11 21:56:50 +01:00
* Added `DeserializationOption::Filter` (issue #959 )
* Added example `JsonFilterExample.ino`
2020-02-20 08:59:25 +01:00
* Changed the array subscript operator to automatically add missing elements
2020-02-13 11:07:23 +01:00
* Fixed "deprecated-copy" warning on GCC 9 (fixes #1184 )
2020-02-22 12:06:39 +01:00
* Fixed `MemberProxy::set(char[])` not duplicating the string (issue #1191 )
2020-02-26 16:16:20 +01:00
* Fixed enums serialized as booleans (issue #1197 )
2020-02-27 11:44:09 +01:00
* Fixed incorrect string comparison on some platforms (issue #1198 )
2020-03-01 17:24:29 +01:00
* Added move-constructor and move-assignment to `BasicJsonDocument`
2020-03-01 18:01:55 +01:00
* Added `BasicJsonDocument::garbageCollect()` (issue #1195 )
2020-03-02 14:50:16 +01:00
* Added `StaticJsonDocument::garbageCollect()`
2020-03-02 12:31:36 +01:00
* Changed copy-constructor of `BasicJsonDocument` to preserve the capacity of the source.
2020-03-05 13:46:45 +01:00
* Removed copy-constructor of `JsonDocument` (issue #1189 )
2020-03-02 12:31:36 +01:00
> ### BREAKING CHANGES
>
> #### Copy-constructor of `BasicJsonDocument`
>
> In previous versions, the copy constructor of `BasicJsonDocument` looked at the source's `memoryUsage()` to choose its capacity.
> Now, the copy constructor of `BasicJsonDocument` uses the same capacity as the source.
>
> Example:
>
> ```c++
> DynamicJsonDocument doc1(64);
> doc1.set(String("example"));
>
> DynamicJsonDocument doc2 = doc1;
> Serial.print(doc2.capacity()); // 8 with ArduinoJson 6.14
2020-03-23 11:03:30 +01:00
> // 64 with ArduinoJson 6.15
2020-03-02 12:31:36 +01:00
> ```
>
> I made this change to get consistent results between copy-constructor and move-constructor, and whether RVO applies or not.
>
> If you use the copy-constructor to optimize your documents, you can use `garbageCollect()` or `shrinkToFit()` instead.
2020-03-05 13:46:45 +01:00
>
> #### Copy-constructor of `JsonDocument`
>
> In previous versions, it was possible to create a function that take a `JsonDocument` by value.
>
> ```c++
> void myFunction(JsonDocument doc) {}
> ```
>
> This function gives the wrong clues because it doesn't receive a copy of the `JsonDocument`, only a sliced version.
> It worked because the copy constructor copied the internal pointers, but it was an accident.
>
> From now, if you need to pass a `JsonDocument` to a function, you must use a reference:
>
> ```c++
> void myFunction(JsonDocument& doc) {}
> ```
2020-02-11 21:56:50 +01:00
2020-01-27 15:05:36 +01:00
v6.14.1 (2020-01-27)
-------
2020-01-27 12:10:10 +01:00
* Fixed regression in UTF16 decoding (issue #1173 )
2020-01-27 12:35:32 +01:00
* Fixed `containsKey()` on `JsonVariantConst`
* Added `getElement()` and `getMember()` to `JsonVariantConst`
2020-01-27 12:10:10 +01:00
2020-01-16 20:48:03 +01:00
v6.14.0 (2020-01-16)
-------
2019-11-07 15:40:20 +01:00
* Added `BasicJsonDocument::shrinkToFit()`
2019-12-13 14:15:30 +01:00
* Added support of `uint8_t` for `serializeJson()` , `serializeJsonPretty()` , and `serializeMsgPack()` (issue #1142 )
2020-01-13 18:16:02 +01:00
* Added `ARDUINOJSON_ENABLE_COMMENTS` to enable support for comments (defaults to 0)
2020-01-04 15:05:20 +01:00
* Auto enable support for `std::string` and `std::stream` on modern compilers (issue #1156 )
2020-01-02 13:14:02 +01:00
(No need to define `ARDUINOJSON_ENABLE_STD_STRING` and `ARDUINOJSON_ENABLE_STD_STREAM` anymore)
* Improved decoding of UTF-16 surrogate pairs (PR #1157 by @kaysievers )
(ArduinoJson now produces standard UTF-8 instead of CESU-8)
2020-01-13 18:20:05 +01:00
* Added `measureJson` , `measureJsonPretty` , and `measureMsgPack` to `keywords.txt`
(This file is used for syntax highlighting in the Arduino IDE)
2020-01-13 20:47:43 +01:00
* Fixed `variant.is<nullptr_t>()`
2020-01-14 10:32:52 +01:00
* Fixed value returned by `serializeJson()` , `serializeJsonPretty()` , and `serializeMsgPack()` when writing to a `String`
2020-01-14 14:50:44 +01:00
* Improved speed of `serializeJson()` , `serializeJsonPretty()` , and `serializeMsgPack()` when writing to a `String`
2020-01-02 13:14:02 +01:00
2020-01-13 18:16:02 +01:00
> ### BREAKING CHANGES
>
> #### Comments
>
> Support for comments in input is now optional and disabled by default.
>
> If you need support for comments, you must defined `ARDUINOJSON_ENABLE_COMMENTS` to `1`; otherwise, you'll receive `InvalidInput` errors.
>
> ```c++
> #define ARDUINOJSON_ENABLE_COMMENTS 1
> #include <ArduinoJson.h>
> ```
2019-11-07 15:40:20 +01:00
2019-11-01 10:32:45 +01:00
v6.13.0 (2019-11-01)
-------
2019-09-13 14:06:41 +02:00
2019-10-25 11:39:04 +02:00
* Added support for custom writer/reader classes (issue #1088 )
2019-09-24 09:38:00 +02:00
* Added conversion from `JsonArray` and `JsonObject` to `bool` , to be consistent with `JsonVariant`
2019-09-27 10:01:17 +02:00
* Fixed `deserializeJson()` when input contains duplicate keys (issue #1095 )
2019-10-14 12:02:26 +02:00
* Improved `deserializeMsgPack()` speed by reading several bytes at once
2019-10-18 22:10:35 +02:00
* Added detection of Atmel AVR8/GNU C Compiler (issue #1112 )
2019-10-29 14:17:11 +01:00
* Fixed deserializer that stopped reading at the first `0xFF` (PR #1118 by @mikee47 )
2019-10-30 19:09:21 +01:00
* Fixed dangling reference in copies of `MemberProxy` and `ElementProxy` (issue #1120 )
2019-09-13 14:06:41 +02:00
2019-09-05 09:31:06 +02:00
v6.12.0 (2019-09-05)
-------
2019-08-26 11:57:57 +02:00
* Use absolute instead of relative includes (issue #1072 )
2019-08-28 13:05:07 +02:00
* Changed `JsonVariant::as<bool>()` to return `true` for any non-null value (issue #1005 )
2019-09-03 15:11:05 +02:00
* Moved ancillary files to `extras/` (issue #1011 )
2019-08-26 11:57:57 +02:00
2019-08-23 08:40:10 +02:00
v6.11.5 (2019-08-23)
-------
2019-08-21 09:31:53 +02:00
* Added fallback implementations of `strlen_P()` , `strncmp_P()` , `strcmp_P()` , and `memcpy_P()` (issue #1073 )
2019-08-12 15:10:56 +02:00
v6.11.4 (2019-08-12)
-------
2019-08-10 11:11:21 +02:00
* Added `measureJson()` to the `ArduinoJson` namespace (PR #1069 by @nomis )
2019-08-12 14:21:45 +02:00
* Added support for `basic_string<char, traits, allocator>` (issue #1045 )
2019-08-10 14:17:23 +02:00
* Fixed example `JsonConfigFile.ino` for ESP8266
2019-08-10 19:32:19 +01:00
* Include `Arduino.h` if `ARDUINO` is defined (PR #1071 by @nomis )
2019-08-10 11:11:21 +02:00
2019-07-22 08:59:54 +02:00
v6.11.3 (2019-07-22)
-------
2019-07-19 10:10:16 +02:00
2019-07-19 10:27:03 +02:00
* Added operators `==` and `!=` for `JsonDocument` , `ElementProxy` , and `MemberProxy`
2019-07-19 12:15:16 +02:00
* Fixed comparison of `JsonVariant` when one contains a linked string and the other contains an owned string (issue #1051 )
2019-07-19 10:10:16 +02:00
2019-07-08 08:44:27 +02:00
v6.11.2 (2019-07-08)
-------
2019-06-25 08:56:14 +02:00
* Fixed assignment of `JsonDocument` to `JsonVariant` (issue #1023 )
2019-07-01 09:07:16 +02:00
* Fix invalid conversion error on Particle Argon (issue #1035 )
2019-06-25 08:56:14 +02:00
2019-06-21 08:49:02 +02:00
v6.11.1 (2019-06-21)
-------
2019-06-21 08:46:05 +02:00
* Fixed `serialized()` not working with Flash strings (issue #1030 )
2019-05-26 21:11:40 +02:00
v6.11.0 (2019-05-26)
-------
2019-05-07 08:12:18 +02:00
2019-05-09 08:33:09 +02:00
* Fixed `deserializeJson()` silently accepting a `Stream*` (issue #978 )
2019-05-07 08:12:18 +02:00
* Fixed invalid result from `operator|` (issue #981 )
2019-05-16 20:41:07 +02:00
* Made `deserializeJson()` more picky about trailing characters (issue #980 )
2019-05-19 17:46:00 +02:00
* Added `ARDUINOJSON_ENABLE_NAN` (default=0) to enable NaN in JSON (issue #973 )
* Added `ARDUINOJSON_ENABLE_INFINITY` (default=0) to enable Infinity in JSON
2019-05-23 21:54:42 +02:00
* Removed implicit conversion in comparison operators (issue #998 )
* Added lexicographical comparison for `JsonVariant`
2019-05-26 11:31:51 +02:00
* Added support for `nullptr` (issue #998 )
2019-05-07 08:12:18 +02:00
2019-05-19 17:46:00 +02:00
> ### BREAKING CHANGES
>
> #### NaN and Infinity
>
> The JSON specification allows neither NaN not Infinity, but previous
> versions of ArduinoJson supported it. Now, ArduinoJson behaves like most
> other libraries: a NaN or and Infinity in the `JsonDocument`, becomes
> a `null` in the output JSON. Also, `deserializeJson()` returns
> `InvalidInput` if the JSON document contains NaN or Infinity.
>
> This version still supports NaN and Infinity in JSON documents, but
> it's disabled by default to be compatible with other JSON parsers.
> If you need the old behavior back, define `ARDUINOJSON_ENABLE_NAN` and
> `ARDUINOJSON_ENABLE_INFINITY` to `1`;:
>
> ```c++
> #define ARDUINOJSON_ENABLE_NAN 1
> #define ARDUINOJSON_ENABLE_INFINITY 1
> #include <ArduinoJson.h>
> ```
>
> #### The "or" operator
2019-05-07 08:12:18 +02:00
>
> This version slightly changes the behavior of the | operator when the
> variant contains a float and the user requests an integer.
>
> Older versions returned the floating point value truncated.
> Now, it returns the default value.
>
> ```c++
> // suppose variant contains 1.2
> int value = variant | 3;
>
> // old behavior:
> value == 1
>
> // new behavior
> value == 3
> ```
>
> If you need the old behavior, you must add `if (variant.is<float>())`.
2019-04-23 08:47:54 +02:00
v6.10.1 (2019-04-23)
-------
2019-03-24 18:59:44 +01:00
* Fixed error "attributes are not allowed on a function-definition"
2019-04-20 15:12:29 +02:00
* Fixed `deserializeJson()` not being picky enough (issue #969 )
2019-04-23 08:46:18 +02:00
* Fixed error "no matching function for call to write(uint8_t)" (issue #972 )
2019-03-24 18:59:44 +01:00
2019-03-22 22:01:46 +01:00
v6.10.0 (2019-03-22)
-------
2019-03-06 15:31:37 +01:00
* Fixed an integer overflow in the JSON deserializer
* Added overflow handling in `JsonVariant::as<T>()` and `JsonVariant::is<T>()` .
- `as<T>()` returns `0` if the integer `T` overflows
- `is<T>()` returns `false` if the integer `T` overflows
2019-03-17 21:48:10 +01:00
* Added `BasicJsonDocument` to support custom allocator (issue #876 )
2019-03-22 08:40:46 +01:00
* Added `JsonDocument::containsKey()` (issue #938 )
2019-03-22 09:00:00 +01:00
* Added `JsonVariant::containsKey()`
2019-03-06 15:31:37 +01:00
2019-03-01 18:16:45 +01:00
v6.9.1 (2019-03-01)
------
2019-02-27 15:57:38 +01:00
2019-02-28 10:22:27 +01:00
* Fixed warning "unused variable" with GCC 4.4 (issue #912 )
2019-02-28 17:20:01 +01:00
* Fixed warning "cast increases required alignment" (issue #914 )
2019-02-28 17:23:44 +01:00
* Fixed warning "conversion may alter value" (issue #914 )
2019-03-01 18:11:27 +01:00
* Fixed naming conflict with "CAPACITY" (issue #839 )
2019-03-01 11:41:47 +01:00
* Muted warning "will change in GCC 7.1" (issue #914 )
2019-02-27 15:57:38 +01:00
* Added a clear error message for `StaticJsonBuffer` and `DynamicJsonBuffer`
2019-03-01 17:31:55 +01:00
* Marked ArduinoJson.h as a "system header"
2019-02-27 15:57:38 +01:00
2019-02-26 08:43:45 +01:00
v6.9.0 (2019-02-26)
------
2019-02-15 13:29:30 +01:00
* Decode escaped Unicode characters like \u00DE (issue #304 , PR #791 )
Many thanks to Daniel Schulte (aka @trilader ) who implemented this feature.
2019-02-25 11:07:01 +01:00
* Added option ARDUINOJSON_DECODE_UNICODE to enable it
2019-02-15 15:33:04 +01:00
* Converted `JsonArray::copyFrom()/copyTo()` to free functions `copyArray()`
* Renamed `JsonArray::copyFrom()` and `JsonObject::copyFrom()` to `set()`
2019-02-15 15:53:53 +01:00
* Renamed `JsonArray::get()` to `getElement()`
* Renamed `JsonArray::add()` (without arg) to `addElement()`
* Renamed `JsonObject::get()` to `getMember()`
* Renamed `JsonObject::getOrCreate()` to `getOrAddMember()`
2019-02-18 16:04:51 +01:00
* Fixed `JsonVariant::isNull()` not returning `true` after `set((char*)0)`
* Fixed segfault after `variant.set(serialized((char*)0))`
2019-02-18 16:18:11 +01:00
* Detect `IncompleteInput` in `false` , `true` , and `null`
2019-02-25 11:07:01 +01:00
* Added `JsonDocument::size()`
2019-02-25 13:21:10 +01:00
* Added `JsonDocument::remove()`
2019-02-25 11:44:22 +01:00
* Added `JsonVariant::clear()`
2019-02-25 13:21:10 +01:00
* Added `JsonVariant::remove()`
2019-02-15 13:29:30 +01:00
2019-01-30 16:39:38 +01:00
v6.8.0-beta (2019-01-30)
-----------
2018-12-14 17:34:49 +01:00
* Import functions in the ArduinoJson namespace to get clearer errors
2018-12-14 17:33:02 +01:00
* Improved syntax highlighting in Arduino IDE
2019-01-14 10:32:19 +01:00
* Removed default capacity of `DynamicJsonDocument`
2019-01-14 10:47:29 +01:00
* `JsonArray::copyFrom()` accepts `JsonArrayConst`
* `JsonVariant::set()` accepts `JsonArrayConst` and `JsonObjectConst`
2019-01-15 12:04:48 +01:00
* `JsonDocument` was missing in the ArduinoJson namespace
2019-01-16 09:50:57 +01:00
* Added `memoryUsage()` to `JsonArray` , `JsonObject` , and `JsonVariant`
2019-01-17 09:55:51 +01:00
* Added `nesting()` to `JsonArray` , `JsonDocument` , `JsonObject` , and `JsonVariant`
2019-01-19 14:45:16 +01:00
* Replaced `JsonDocument::nestingLimit` with an additional parameter
to `deserializeJson()` and `deserializeMsgPack()`
2019-01-20 14:35:22 +01:00
* Fixed uninitialized variant in `JsonDocument`
2019-01-23 10:47:20 +01:00
* Fixed `StaticJsonDocument` copy constructor and copy assignment
* The copy constructor of `DynamicJsonDocument` chooses the capacity according to the memory usage of the source, not from the capacity of the source.
* Added the ability to create/assign a `StaticJsonDocument` /`DynamicJsonDocument` from a `JsonArray` /`JsonObject` /`JsonVariant`
2019-01-20 14:35:22 +01:00
* Added `JsonDocument::isNull()`
2019-01-23 11:43:29 +01:00
* Added `JsonDocument::operator[]`
2019-01-23 18:19:24 +01:00
* Added `ARDUINOJSON_TAB` to configure the indentation character
* Reduced the size of the pretty JSON serializer
2019-01-29 14:09:09 +01:00
* Added `add()` , `createNestedArray()` and `createNestedObject()` to `JsonVariant`
* `JsonVariant` automatically promotes to `JsonObject` or `JsonArray` on write.
Calling `JsonVariant::to<T>()` is not required anymore.
* `JsonDocument` now support the same operations as `JsonVariant` .
Calling `JsonDocument::as<T>()` is not required anymore.
* Fixed example `JsonHttpClient.ino`
2019-01-29 17:00:11 +01:00
* User can now use a `JsonString` as a key or a value
2019-01-14 10:32:19 +01:00
> ### BREAKING CHANGES
>
2019-01-19 14:45:16 +01:00
> #### `DynamicJsonDocument`'s constructor
>
2019-01-14 10:32:19 +01:00
> The parameter to the constructor of `DynamicJsonDocument` is now mandatory
>
> Old code:
>
> ```c++
> DynamicJsonDocument doc;
> ```
>
> New code:
>
> ```c++
> DynamicJsonDocument doc(1024);
> ```
2019-01-19 14:45:16 +01:00
>
> #### Nesting limit
>
> `JsonDocument::nestingLimit` was replaced with a new parameter to `deserializeJson()` and `deserializeMsgPack()`.
>
> Old code:
>
> ```c++
> doc.nestingLimit = 15;
> deserializeJson(doc, input);
> ```
>
> New code:
>
> ```c++
> deserializeJson(doc, input, DeserializationOption::NestingLimit(15));
> ```
2018-12-14 17:34:49 +01:00
2018-12-07 12:23:02 +01:00
v6.7.0-beta (2018-12-07)
-----------
2018-11-16 10:26:59 +01:00
* Removed the automatic expansion of `DynamicJsonDocument` , it now has a fixed capacity.
2018-11-30 14:27:33 +01:00
* Restored the monotonic allocator because the code was getting too big
2018-11-30 14:26:15 +01:00
* Reduced the memory usage
2018-12-07 09:16:58 +01:00
* Reduced the code size
2018-12-07 12:08:30 +01:00
* Renamed `JsonKey` to `JsonString`
2018-12-04 11:19:22 +01:00
* Removed spurious files in the Particle library
2018-11-16 10:26:59 +01:00
2018-11-13 18:05:59 +01:00
v6.6.0-beta (2018-11-13)
-----------
2018-10-18 14:51:02 +02:00
* Removed `JsonArray::is<T>(i)` and `JsonArray::set(i,v)`
* Removed `JsonObject::is<T>(k)` and `JsonObject::set(k,v)`
* Replaced `T JsonArray::get<T>(i)` with `JsonVariant JsonArray::get(i)`
* Replaced `T JsonObject::get<T>(k)` with `JsonVariant JsonObject::get(k)`
2018-11-09 17:27:32 +01:00
* Added `JSON_STRING_SIZE()`
2018-11-30 14:27:33 +01:00
* ~~Replacing or removing a value now releases the memory~~
2018-11-13 14:31:53 +01:00
* Added `DeserializationError::code()` to be used in switch statements (issue #846 )
2018-10-18 14:51:02 +02:00
2018-10-13 13:23:34 +02:00
v6.5.0-beta (2018-10-13)
-----------
2018-10-01 12:55:40 +02:00
* Added implicit conversion from `JsonArray` and `JsonObject` to `JsonVariant`
2018-10-02 16:54:05 +02:00
* Allow mixed configuration in compilation units (issue #809 )
2018-10-04 11:16:23 +02:00
* Fixed object keys not being duplicated
* `JsonPair::key()` now returns a `JsonKey`
2018-10-08 18:32:58 +02:00
* Increased the default capacity of `DynamicJsonDocument`
2018-10-06 17:20:28 +02:00
* Fixed `JsonVariant::is<String>()` (closes #763 )
2018-10-12 12:00:27 +02:00
* Added `JsonArrayConst` , `JsonObjectConst` , and `JsonVariantConst`
2018-10-13 13:21:30 +02:00
* Added copy-constructor and copy-assignment-operator for `JsonDocument` (issue #827 )
2018-10-01 12:55:40 +02:00
2018-09-11 16:31:04 +02:00
v6.4.0-beta (2018-09-11)
-----------
2018-09-11 16:05:56 +02:00
* Copy `JsonArray` and `JsonObject` , instead of storing pointers (issue #780 )
2018-09-11 16:31:04 +02:00
* Added `JsonVariant::to<JsonArray>()` and `JsonVariant::to<JsonObject>()`
2018-09-11 16:05:56 +02:00
2018-08-31 16:57:14 +02:00
v6.3.0-beta (2018-08-31)
-----------
2018-08-21 17:56:16 +02:00
* Implemented reference semantics for `JsonVariant`
2018-09-11 16:05:56 +02:00
* Replaced `JsonPair` 's `key` and `value` with `key()` and `value()`
2018-08-21 18:07:41 +02:00
* Fixed `serializeJson(obj[key], dst)` (issue #794 )
2018-08-21 17:56:16 +02:00
> ### BREAKING CHANGES
>
> #### JsonVariant
>
> `JsonVariant` now has a semantic similar to `JsonObject` and `JsonArray`.
> It's a reference to a value stored in the `JsonDocument`.
> As a consequence, a `JsonVariant` cannot be used as a standalone variable anymore.
>
> Old code:
>
> ```c++
> JsonVariant myValue = 42;
> ```
>
> New code:
>
> ```c++
> DynamicJsonDocument doc;
> JsonVariant myValue = doc.to<JsonVariant>();
> myValue.set(42);
> ```
>
> #### JsonPair
>
> Old code:
>
> ```c++
> for(JsonPair p : myObject) {
> Serial.println(p.key);
> Serial.println(p.value.as<int>());
> }
> ```
>
> New code:
>
> ```c++
> for(JsonPair p : myObject) {
> Serial.println(p.key());
> Serial.println(p.value().as<int>());
> }
> ```
>
> CAUTION: the key is now read only!
2018-08-31 16:38:42 +02:00
v6.2.3-beta (2018-07-19)
2018-07-19 18:28:03 +02:00
-----------
2018-07-19 17:22:28 +02:00
* Fixed exception when using Flash strings as object keys (issue #784 )
2018-08-31 16:38:42 +02:00
v6.2.2-beta (2018-07-18)
2018-07-18 20:21:00 +02:00
-----------
2018-07-18 20:19:22 +02:00
* Fixed `invalid application of 'sizeof' to incomplete type '__FlashStringHelper'` (issue #783 )
* Fixed `char[]` not duplicated when passed to `JsonVariant::operator[]`
2018-08-31 16:38:42 +02:00
v6.2.1-beta (2018-07-17)
2018-07-17 10:27:04 +02:00
-----------
2018-07-17 10:24:21 +02:00
* Fixed `JsonObject` not inserting keys of type `String` (issue #782 )
2018-08-31 16:38:42 +02:00
v6.2.0-beta (2018-07-12)
2018-07-12 09:10:13 +02:00
-----------
2018-07-04 11:57:30 +02:00
* Disabled lazy number deserialization (issue #772 )
2018-10-09 15:00:49 +02:00
* Fixed `JsonVariant::is<int>()` that returned true for empty strings
2018-07-04 12:07:03 +02:00
* Improved float serialization when `-fsingle-precision-constant` is used
2018-07-12 09:08:20 +02:00
* Renamed function `RawJson()` to `serialized()`
* `serializeMsgPack()` now supports values marked with `serialized()`
2018-07-04 11:57:30 +02:00
> ### BREAKING CHANGES
>
2018-07-12 09:08:20 +02:00
> #### Non quoted strings
>
2018-07-04 11:57:30 +02:00
> Non quoted strings are now forbidden in values, but they are still allowed in keys.
> For example, `{key:"value"}` is accepted, but `{key:value}` is not.
2018-07-12 09:08:20 +02:00
>
> #### Preformatted values
>
> Old code:
>
> ```c++
> object["values"] = RawJson("[1,2,3,4]");
> ```
>
> New code:
>
> ```c++
> object["values"] = serialized("[1,2,3,4]");
> ```
2018-07-04 11:57:30 +02:00
2018-08-31 16:38:42 +02:00
v6.1.0-beta (2018-07-02)
2018-07-02 09:54:35 +02:00
-----------
2018-07-02 09:35:21 +02:00
* Return `JsonArray` and `JsonObject` by value instead of reference (issue #309 )
* Replaced `success()` with `isNull()`
> ### BREAKING CHANGES
>
> Old code:
>
> ```c++
> JsonObject& obj = doc.to<JsonObject>();
> JsonArray& arr = obj.createNestedArray("key");
> if (!arr.success()) {
2018-07-04 11:57:30 +02:00
> Serial.println("Not enough memory");
2018-07-02 09:35:21 +02:00
> return;
> }
> ```
>
> New code:
>
> ```c++
> JsonObject obj = doc.to<JsonObject>();
> JsonArray arr = obj.createNestedArray("key");
> if (arr.isNull()) {
2018-07-04 11:57:30 +02:00
> Serial.println("Not enough memory");
2018-07-02 09:35:21 +02:00
> return;
> }
> ```
2018-08-31 16:38:42 +02:00
v6.0.1-beta (2018-06-11)
2018-06-11 12:24:33 +02:00
-----------
2018-06-11 12:21:50 +02:00
* Fixed conflicts with `isnan()` and `isinf()` macros (issue #752 )
2018-08-31 16:38:42 +02:00
v6.0.0-beta (2018-06-07)
2018-06-07 10:47:00 +02:00
-----------
2018-04-17 21:27:45 +02:00
* Added `DynamicJsonDocument` and `StaticJsonDocument`
2018-03-01 09:24:58 +01:00
* Added `deserializeJson()`
* Added `serializeJson()` and `serializeJsonPretty()`
* Added `measureJson()` and `measureJsonPretty()`
2018-05-29 08:31:17 +02:00
* Added `serializeMsgPack()` , `deserializeMsgPack()` and `measureMsgPack()` (issue #358 )
2018-04-10 17:55:51 +02:00
* Added example `MsgPackParser.ino` (issue #358 )
2018-05-14 17:12:59 +02:00
* Added support for non zero-terminated strings (issue #704 )
2018-03-01 09:24:58 +01:00
* Removed `JsonBuffer::parseArray()` , `parseObject()` and `parse()`
* Removed `JsonBuffer::createArray()` and `createObject()`
* Removed `printTo()` and `prettyPrintTo()`
* Removed `measureLength()` and `measurePrettyLength()`
2018-03-15 09:43:10 +01:00
* Removed all deprecated features
2018-02-26 16:05:16 +01:00
> ### BREAKING CHANGES
>
> #### Deserialization
>
> Old code:
>
> ```c++
> DynamicJsonBuffer jb;
> JsonObject& obj = jb.parseObject(json);
> if (obj.success()) {
>
> }
> ```
>
> New code:
>
> ```c++
2018-04-17 21:27:45 +02:00
> DynamicJsonDocument doc;
2018-05-15 18:23:09 +02:00
> DeserializationError error = deserializeJson(doc, json);
2018-03-09 16:58:01 +01:00
> if (error) {
2018-02-26 16:05:16 +01:00
>
> }
2018-04-17 21:27:45 +02:00
> JsonObject& obj = doc.as<JsonObject>();
2018-02-26 16:05:16 +01:00
> ```
>
> #### Serialization
>
> Old code:
>
> ```c++
> DynamicJsonBuffer jb;
> JsonObject& obj = jb.createObject();
> obj["key"] = "value";
> obj.printTo(Serial);
> ```
>
> New code:
>
> ```c++
2018-04-17 21:27:45 +02:00
> DynamicJsonDocument obj;
> JsonObject& obj = doc.to<JsonObject>();
2018-02-26 16:05:16 +01:00
> obj["key"] = "value";
2018-04-17 21:27:45 +02:00
> serializeJson(doc, Serial);
2018-02-26 16:05:16 +01:00
> ```