2015-05-23 15:32:50 +02:00
ArduinoJson: change log
=======================
2020-08-23 09:29:40 +02:00
HEAD
----
* 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-05 17:33:47 +02:00
* Fixed `JsonVariant::set((char*)0)` which returned false instead of true (issue #1368 )
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-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
> ```
2018-06-01 09:21:42 +02:00
v5.13.2
-------
2018-03-12 18:28:37 +01:00
* Fixed `JsonBuffer::parse()` not respecting nesting limit correctly (issue #693 )
* Fixed inconsistencies in nesting level counting (PR #695 from Zhenyu Wu)
2018-06-01 09:08:38 +02:00
* Fixed null values that could be pass to `strcmp()` (PR #745 from Mike Karlesky)
2018-06-01 09:16:45 +02:00
* Added macros `ARDUINOJSON_VERSION` , `ARDUINOJSON_VERSION_MAJOR` ...
2018-03-12 18:28:37 +01:00
2018-02-19 08:54:37 +01:00
v5.13.1
-------
2018-02-09 09:05:29 +01:00
* Fixed `JsonVariant::operator|(int)` that returned the default value if the variant contained a double (issue #675 )
2018-02-16 11:04:07 +01:00
* Allowed non-quoted key to contain underscores (issue #665 )
2018-02-09 09:05:29 +01:00
2018-01-19 15:35:19 +01:00
v5.13.0
-------
2018-01-14 13:46:28 +01:00
* Changed the rules of string duplication (issue #658 )
2018-01-18 09:43:37 +01:00
* `RawJson()` accepts any kind of string and obeys to the same rules for duplication
2018-01-14 13:49:37 +01:00
* Changed the return type of `strdup()` to `const char*` to prevent double duplication
2018-01-14 14:02:10 +01:00
* Marked `strdup()` as deprecated
2018-01-14 13:46:28 +01:00
> ### New rules for string duplication
>
2018-01-18 09:43:37 +01:00
> | type | duplication |
> |:---------------------------|:------------|
> | const char* | no |
> | char* | ~~no~~ yes |
> | String | yes |
> | std::string | yes |
> | const __FlashStringHelper* | yes |
2018-01-14 13:46:28 +01:00
>
> These new rules make `JsonBuffer::strdup()` useless.
2017-12-11 17:50:18 +01:00
v5.12.0
-------
2017-11-29 09:49:40 +01:00
2017-12-15 17:52:47 +01:00
* Added `JsonVariant::operator|` to return a default value (see below)
2017-12-03 13:49:51 +01:00
* Added a clear error message when compiled as C instead of C++ (issue #629 )
2017-12-05 21:18:21 +01:00
* Added detection of MPLAB XC compiler (issue #629 )
2017-12-05 21:24:28 +01:00
* Added detection of Keil ARM Compiler (issue #629 )
2017-12-11 17:20:27 +01:00
* Added an example that shows how to save and load a configuration file
* Reworked all other examples
2017-11-13 15:47:26 +01:00
2017-11-29 09:49:40 +01:00
> ### 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";
> ```
2017-10-17 10:21:52 +02:00
v5.11.2
-------
2017-08-30 21:51:10 +02:00
* Fixed `DynamicJsonBuffer::clear()` not resetting allocation size (issue #561 )
2017-10-17 10:19:21 +02:00
* Fixed incorrect rounding for float values (issue #588 )
2017-08-30 21:51:10 +02:00
2017-07-14 11:17:11 +02:00
v5.11.1
-------
2017-07-07 23:04:42 +02:00
* Removed dependency on `PGM_P` as Particle 0.6.2 doesn't define it (issue #546 )
2017-07-09 15:24:58 +02:00
* Fixed warning "dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]"
* Fixed warning "floating constant exceeds range of 'float' [-Woverflow]" (issue #544 )
2017-07-14 11:14:50 +02:00
* Fixed warning "this statement may fall through" [-Wimplicit-fallthrough=] (issue #539 )
2017-07-09 15:24:58 +02:00
* Removed `ARDUINOJSON_DOUBLE_IS_64BITS` as it became useless.
2017-07-14 10:51:46 +02:00
* Fixed too many decimals places in float serialization (issue #543 )
2017-07-07 23:04:42 +02:00
2017-06-25 15:11:57 +02:00
v5.11.0
-------
2017-06-17 14:17:01 +02:00
* Made `JsonBuffer` non-copyable (PR #524 by @luisrayas3 )
2017-06-17 14:50:21 +02:00
* Added `StaticJsonBuffer::clear()`
2017-06-17 16:48:40 +02:00
* Added `DynamicJsonBuffer::clear()`
2017-06-17 14:17:01 +02:00
2017-06-12 21:10:02 +02:00
v5.10.1
-------
2017-05-28 15:33:03 +02:00
* Fixed IntelliSense errors in Visual Micro (issue #483 )
2017-06-01 20:47:09 +02:00
* Fixed compilation in IAR Embedded Workbench (issue #515 )
2017-06-03 16:22:26 +02:00
* Fixed reading "true" as a float (issue #516 )
2017-06-01 20:47:09 +02:00
* Added `ARDUINOJSON_DOUBLE_IS_64BITS`
* Added `ARDUINOJSON_EMBEDDED_MODE`
2017-05-28 15:33:03 +02:00
2017-05-20 09:11:03 +02:00
v5.10.0
-------
2017-05-02 21:29:45 +02:00
2017-05-20 09:06:53 +02:00
* Removed configurable number of decimal places (issues #288 , #427 and #506 )
2017-06-01 20:47:09 +02:00
* Changed exponentiation thresholds to `1e7` and `1e-5` (issues #288 , #427 and #506 )
2017-05-20 09:06:53 +02:00
* `JsonVariant::is<double>()` now returns `true` for integers
2017-05-02 21:29:45 +02:00
* Fixed error `IsBaseOf is not a member of ArduinoJson::TypeTraits` (issue #495 )
2017-05-04 21:58:28 +02:00
* Fixed error `forming reference to reference` (issue #495 )
2017-05-02 21:29:45 +02:00
2017-11-29 09:49:40 +01:00
> ### 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<int>()` | `true` | `true` |
> | `JsonVariant(42).is<float>()` | `false` | `true` |
> | `JsonVariant(42).is<double>()` | `false` | `true` |
2017-05-20 09:06:53 +02:00
2017-04-24 21:43:03 +02:00
v5.9.0
------
2017-04-12 21:00:13 +02:00
* Added `JsonArray::remove(iterator)` (issue #479 )
* Added `JsonObject::remove(iterator)`
2017-04-12 17:03:33 +02:00
* Renamed `JsonArray::removeAt(size_t)` into `remove(size_t)`
2017-04-20 10:04:40 +02:00
* Renamed folder `include/` to `src/`
2017-04-20 11:19:29 +02:00
* Fixed warnings `floating constant exceeds range of float` and `floating constant truncated to zero` (issue #483 )
2017-04-22 11:33:40 +02:00
* Removed `Print` class and converted `printTo()` to a template method (issue #276 )
* Removed example `IndentedPrintExample.ino`
2017-04-24 21:35:41 +02:00
* Now compatible with Particle 0.6.1, thanks to Jacob Nite (issue #294 and PR #461 by @foodbag )
2017-04-12 21:00:13 +02:00
2017-03-26 21:33:12 +02:00
v5.8.4
------
2017-03-19 15:23:06 +01:00
* Added custom implementation of `strtod()` (issue #453 )
2017-03-25 21:55:13 +01:00
* Added custom implementation of `strtol()` (issue #465 )
* `char` is now treated as an integral type (issue #337 , #370 )
2017-03-19 15:23:06 +01:00
2017-02-11 15:12:03 +01:00
v5.8.3
------
2017-01-31 10:06:40 +01:00
* Fixed an access violation in `DynamicJsonBuffer` when memory allocation fails (issue #433 )
2017-02-11 15:06:17 +01:00
* Added operators `==` and `!=` for two `JsonVariant` s (issue #436 )
2017-02-11 15:09:08 +01:00
* Fixed `JsonVariant::operator[const FlashStringHelper*]` (issue #441 )
2017-01-31 10:06:40 +01:00
2017-01-22 18:08:32 +01:00
v5.8.2
------
2017-01-17 21:48:13 +01:00
* Fixed parsing of comments (issue #421 )
2017-01-22 10:31:05 +01:00
* Fixed ignored `Stream` timeout (issue #422 )
* Made sure we don't read more that necessary (issue #422 )
2017-01-22 11:10:45 +01:00
* Fixed error when the key of a `JsonObject` is a `char[]` (issue #423 )
* Reduced code size when using `const` references
2017-01-22 15:42:47 +01:00
* Fixed error with string of type `unsigned char*` (issue #428 )
2017-01-22 17:24:17 +01:00
* Added `deprecated` attribute on `asArray()` , `asObject()` and `asString()` (issue #420 )
2017-01-17 21:48:13 +01:00
2017-01-15 21:02:22 +01:00
v5.8.1
------
2017-01-11 10:17:27 +01:00
* Fixed error when assigning a `volatile int` to a `JsonVariant` (issue #415 )
2017-01-15 15:11:26 +01:00
* Fixed errors with Variable Length Arrays (issue #416 )
2017-01-15 15:18:59 +01:00
* Fixed error when both `ARDUINOJSON_ENABLE_STD_STREAM` and `ARDUINOJSON_ENABLE_ARDUINO_STREAM` are set to `1`
2017-01-15 16:23:20 +01:00
* Fixed error "Stream does not name a type" (issue #412 )
2017-01-11 10:17:27 +01:00
2017-01-03 22:39:44 +01:00
v5.8.0
------
2016-12-23 14:45:32 +01:00
* Added operator `==` to compare `JsonVariant` and strings (issue #402 )
2017-01-03 22:03:50 +01:00
* Added support for `Stream` (issue #300 )
2016-12-29 17:26:16 +01:00
* Reduced memory consumption by not duplicating spaces and comments
2016-12-23 14:45:32 +01:00
2017-11-29 09:49:40 +01:00
> ### 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<typename TJsonBuffer> void myFunction(TJsonBuffer& jsonBuffer);
> ```
2017-05-20 09:11:03 +02:00
2016-12-10 16:00:52 +01:00
v5.7.3
------
2016-12-03 22:19:11 +01:00
2016-12-10 15:59:48 +01:00
* Added an `printTo(char[N])` and `prettyPrintTo(char[N])` (issue #292 )
2016-12-10 14:45:58 +01:00
* Added ability to set a nested value like this: `root["A"]["B"] = "C"` (issue #352 )
2016-12-03 22:19:11 +01:00
* Renamed `*.ipp` to `*Impl.hpp` because they were ignored by Arduino IDE (issue #396 )
2016-11-23 21:54:56 +01:00
v5.7.2
------
2016-11-16 22:24:58 +01:00
* Made PROGMEM available on more platforms (issue #381 )
2016-11-23 21:53:29 +01:00
* Fixed PROGMEM causing an exception on ESP8266 (issue #383 )
2016-11-16 22:24:58 +01:00
2016-11-13 20:21:16 +01:00
v5.7.1
------
2016-11-13 20:16:12 +01:00
* Added support for PROGMEM (issue #76 )
2016-11-13 20:19:36 +01:00
* Fixed compilation error when index is not an `int` (issue #381 )
2016-11-13 20:16:12 +01:00
2016-11-06 17:52:57 +01:00
v5.7.0
------
2016-09-21 22:11:38 +02:00
2016-11-06 17:48:32 +01:00
* Templatized all functions using `String` or `std::string`
* Removed `ArduinoJson::String`
* Removed `JsonVariant::defaultValue<T>()`
* Removed non-template `JsonObject::get()` and `JsonArray.get()`
* Fixed support for `StringSumHelper` (issue #184 )
* Replaced `ARDUINOJSON_USE_ARDUINO_STRING` by `ARDUINOJSON_ENABLE_STD_STRING` and `ARDUINOJSON_ENABLE_ARDUINO_STRING` (issue #378 )
* Added example `StringExample.ino` to show where `String` can be used
2016-09-21 22:11:38 +02:00
* Increased default nesting limit to 50 when compiled for a computer (issue #349 )
2017-11-29 09:49:40 +01:00
> ### 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<JsonVariant>("myKey");
> JsonVariant value2 = myArray.get<JsonVariant>(0);
> ```
2016-11-06 17:48:32 +01:00
2016-09-20 10:11:19 +02:00
v5.6.7
------
2016-09-11 13:43:21 +02:00
* Fixed `array[idx].as<JsonVariant>()` and `object[key].as<JsonVariant>()`
2016-09-16 10:10:31 +02:00
* Fixed return value of `JsonObject::set()` (issue #350 )
2016-09-17 13:51:54 +02:00
* Fixed undefined behavior in `Prettyfier` and `Print` (issue #354 )
2016-09-19 10:08:14 +02:00
* Fixed parser that incorrectly rejected floats containing a `+` (issue #349 )
2016-09-11 13:43:21 +02:00
2016-08-29 20:55:36 +02:00
v5.6.6
------
2016-08-17 20:36:50 +02:00
* Fixed `-Wparentheses` warning introduced in v5.6.5 (PR #335 by @nuket )
2016-08-25 11:40:04 +02:00
* Added `.mbedignore` for ARM mbdeb (PR #334 by @nuket )
2016-08-29 20:54:39 +02:00
* Fixed `JsonVariant::success()` which didn't propagate `JsonArray::success()` nor `JsonObject::success()` (issue #342 ).
2016-08-17 20:36:50 +02:00
2016-08-15 12:25:48 +02:00
v5.6.5
------
2016-08-15 12:24:08 +02:00
* `as<char*>()` now returns `true` when input is `null` (issue #330 )
2016-07-20 13:16:14 +02:00
v5.6.4
------
2016-07-20 13:15:17 +02:00
* Fixed error in float serialization (issue #324 )
2016-07-19 08:59:42 +02:00
v5.6.3
------
2016-07-10 16:12:49 +02:00
* Improved speed of float serialization (about twice faster)
2016-07-17 17:22:58 +02:00
* Added `as<JsonArray>()` as a synonym for `as<JsonArray&>()` ... (issue #291 )
2016-07-19 08:57:19 +02:00
* Fixed `call of overloaded isinf(double&) is ambiguous` (issue #284 )
2016-07-10 16:12:49 +02:00
2016-06-30 20:23:58 +02:00
v5.6.2
------
2016-06-30 20:22:47 +02:00
* Fixed build when another lib does `#undef isnan` (issue #284 )
2016-06-24 09:24:44 +02:00
v5.6.1
------
2016-06-23 21:27:24 +02:00
* Added missing `#pragma once` (issue #310 )
2016-06-22 21:42:55 +02:00
v5.6.0
------
2016-06-22 21:41:19 +02:00
* ArduinoJson is now a header-only library (issue #199 )
2016-06-06 22:12:48 +02:00
v5.5.1
------
2016-06-06 22:10:28 +02:00
* Fixed compilation error with Intel Galileo (issue #299 )
2016-05-22 15:00:09 +02:00
v5.5.0
------
2016-05-18 09:15:49 +02:00
* Added `JsonVariant::success()` (issue #279 )
2016-05-18 09:17:45 +02:00
* Renamed `JsonVariant::invalid<T>()` to `JsonVariant::defaultValue<T>()`
2016-05-18 09:15:49 +02:00
2016-05-06 08:46:13 +02:00
v5.4.0
------
2016-05-06 08:44:31 +02:00
* Changed `::String` to `ArduinoJson::String` (issue #275 )
* Changed `::Print` to `ArduinoJson::Print` too
2016-04-30 09:49:45 +02:00
v5.3.0
------
2016-04-28 08:42:59 +02:00
2016-04-28 18:54:14 +02:00
* Added custom implementation of `ftoa` (issues #266 , #267 , #269 and #270 )
2016-04-30 09:47:53 +02:00
* Added `JsonVariant JsonBuffer::parse()` (issue #265 )
2016-04-28 18:54:14 +02:00
* Fixed `unsigned long` printed as `signed long` (issue #170 )
2016-04-28 08:42:59 +02:00
2016-04-16 16:17:19 +02:00
v5.2.0
------
2016-04-05 20:47:04 +02:00
* Added `JsonVariant::as<char*>()` as a synonym for `JsonVariant::as<const char*>()` (issue #257 )
2016-04-08 20:11:36 +02:00
* Added example `JsonHttpClient` (issue #256 )
2016-04-14 20:06:38 +02:00
* Added `JsonArray::copyTo()` and `JsonArray::copyFrom()` (issue #254 )
2016-04-16 16:15:01 +02:00
* Added `RawJson()` to insert pregenerated JSON portions (issue #259 )
2016-04-05 20:47:04 +02:00
2016-02-23 21:30:01 +01:00
v5.1.1
------
2016-02-23 21:27:52 +01:00
* Removed `String` duplication when one replaces a value in a `JsonObject` (PR #232 by @ulion )
2016-02-14 16:18:13 +01:00
v5.1.0
------
* Added support of `long long` (issue #171 )
* Moved all build settings to `ArduinoJson/Configuration.hpp`
2017-11-29 09:49:40 +01:00
> ### BREAKING CHANGE :warning:
>
> If you defined `ARDUINOJSON_ENABLE_STD_STREAM`, you now need to define it to `1`.
2016-02-14 16:18:13 +01:00
2016-01-31 21:57:08 +01:00
v5.0.8
------
2015-12-22 23:43:44 +01:00
2015-12-23 14:42:22 +01:00
* Made the library compatible with [PlatformIO ](http://platformio.org/ ) (issue #181 )
2016-01-31 21:56:04 +01:00
* Fixed `JsonVariant::is<bool>()` that was incorrectly returning false (issue #214 )
2015-12-22 23:43:44 +01:00
2015-11-25 21:15:11 +01:00
v5.0.7
------
2015-11-19 21:53:27 +01:00
2015-11-25 21:15:11 +01:00
* Made library easier to use from a CMake project: simply `add_subdirectory(ArduinoJson/src)`
2015-11-25 21:09:18 +01:00
* Changed `String` to be a `typedef` of `std::string` (issues #142 and #161 )
2017-11-29 09:49:40 +01:00
> ### BREAKING CHANGES :warning:
>
> - `JsonVariant(true).as<String>()` now returns `"true"` instead of `"1"`
> - `JsonVariant(false).as<String>()` now returns `"false"` instead of `"0"`
2015-11-19 21:53:27 +01:00
2015-11-09 21:37:40 +01:00
v5.0.6
------
* Added parameter to `DynamicJsonBuffer` constructor to set initial size (issue #152 )
* Fixed warning about library category in Arduino 1.6.6 (issue #147 )
2015-11-09 22:49:49 +01:00
* Examples: Added a loop to wait for serial port to be ready (issue #156 )
2015-11-09 21:37:40 +01:00
2015-10-30 22:29:47 +01:00
v5.0.5
------
2015-11-09 21:37:40 +01:00
* Added overload `JsonObjectSuscript::set(value, decimals)` (issue #143 )
2015-10-30 23:03:16 +01:00
* Use `float` instead of `double` to reduce the size of `JsonVariant` (issue #134 )
2015-10-30 22:29:47 +01:00
2015-09-29 22:02:12 +02:00
v5.0.4
2015-09-28 22:14:50 +02:00
------
* Fixed ambiguous overload with `JsonArraySubscript` and `JsonObjectSubscript` (issue #122 )
2015-09-19 16:20:06 +02:00
v5.0.3
------
2015-09-19 16:23:09 +02:00
* Fixed `printTo(String)` which wrote numbers instead of strings (issue #120 )
2015-09-19 16:25:18 +02:00
* Fixed return type of `JsonArray::is<T>()` and some others (issue #121 )
2015-09-19 16:20:06 +02:00
2015-08-26 20:49:24 +02:00
v5.0.2
------
2016-07-20 13:15:17 +02:00
* Fixed segmentation fault in `parseObject(String)` and `parseArray(String)` , when the
2015-09-01 22:21:50 +02:00
`StaticJsonBuffer` is too small to hold a copy of the string
* Fixed Clang warning "register specifier is deprecated" (issue #102 )
2015-09-01 22:26:51 +02:00
* Fixed GCC warning "declaration shadows a member" (issue #103 )
2015-09-01 22:21:50 +02:00
* Fixed memory alignment, which made ESP8266 crash (issue #104 )
2015-08-27 21:47:49 +02:00
* Fixed compilation on Visual Studio 2010 and 2012 (issue #107 )
2015-08-26 20:49:24 +02:00
2015-08-24 15:20:40 +02:00
v5.0.1
------
* Fixed compilation with Arduino 1.0.6 (issue #99 )
2015-08-20 15:15:59 +02:00
v5.0.0
------
2015-05-23 15:32:50 +02:00
2015-07-25 15:38:12 +02:00
* Added support of `String` class (issues #55 , #56 , #70 , #77 )
* Added `JsonBuffer::strdup()` to make a copy of a string (issues #10 , #57 )
* Implicitly call `strdup()` for `String` but not for `char*` (issues #84 , #87 )
2015-07-10 22:11:26 +02:00
* Added support of non standard JSON input (issue #44 )
2015-07-27 22:16:42 +02:00
* Added support of comments in JSON input (issue #88 )
2015-08-10 17:22:22 +02:00
* Added implicit cast between numerical types (issues #64 , #69 , #93 )
* Added ability to read number values as string (issue #90 )
2015-07-25 15:38:12 +02:00
* Redesigned `JsonVariant` to leverage converting constructors instead of assignment operators (issue #66 )
2015-05-31 14:42:09 +02:00
* Switched to new the library layout (requires Arduino 1.0.6 or above)
2015-05-23 15:32:50 +02:00
2017-11-29 09:49:40 +01:00
> ### 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()`
2014-07-15 13:50:49 +02:00
2015-05-25 15:38:58 +02:00
**Personal note about the `String` class** :
Support of the `String` class has been added to the library because many people use it in their programs.
However, you should not see this as an invitation to use the `String` class.
The `String` class is **bad** because it uses dynamic memory allocation.
2015-05-31 14:42:09 +02:00
Compared to static allocation, it compiles to a bigger, slower program, and is less predictable.
2015-05-25 15:38:58 +02:00
You certainly don't want that in an embedded environment!