Releases: bblanchon/ArduinoJson
ArduinoJson 5.9.0
Changes since 5.8.4
- Added
JsonArray::remove(iterator)
(issue #479) - Added
JsonObject::remove(iterator)
- Renamed
JsonArray::removeAt(size_t)
intoremove(size_t)
⚠️ - Renamed folder
include/
tosrc/
- Fixed warnings
floating constant exceeds range of float
andfloating constant truncated to zero
(issue #483) - Removed
Print
class and convertedprintTo()
to a template method (issue #276)⚠️ - Removed example
IndentedPrintExample.ino
- Now compatible with Particle 0.6.1, thanks to Jacob Nite (issue #294 and PR #461 by @foodbag)
ArduinoJson 5.8.4
Changes since 5.8.3
- Added custom implementation of
strtod()
(issue #453) - Added custom implementation of
strtol()
(issue #465) char
is now treated as an integral type (issue #337, #370)
🆕 Single File Distribution
Starting with this revision, ArduinoJson ships as a single file too.
The single file simplifies the usage of the library as you just need to copy the ArduinoJson header (see bellow) alongside with your project's source code.
Two options are available:
ArduinoJson-v5.8.4.hpp
contains all the library in theArduinoJson
namespaceArduinoJson-v5.8.4.h
is the same but adds ausing namespace ArduinoJson
If you don't know which one to pick, choose the .h
ArduinoJson 5.8.3
ArduinoJson 5.8.2
Changes since 5.8.1
- Fixed parsing of comments (issue #421)
- Fixed ignored
Stream
timeout (issue #422) - Made sure we don't read more that necessary (issue #422)
- Fixed error when the key of a
JsonObject
is achar[]
(issue #423) - Reduced code size when using
const
references - Fixed error with string of type
unsigned char*
(issue #428) - Added
deprecated
attribute onasArray()
,asObject()
andasString()
(issue #420)
How to replace deprecated functions?
Old Name | New Name |
---|---|
asArray() |
as<JsonArray>() |
asObject() |
as<JsonObject>() |
asString() |
as<char*>() |
ArduinoJson 5.8.1
Changes since 5.8.0
ArduinoJson 5.8.0
Changes since 5.7.3
- Added operator
==
to compareJsonVariant
and strings (issue #402) - Added support for
Stream
(issue #300) - Reduced memory consumption by not duplicating spaces and comments
Breaking changes
JsonBuffer::parseObject()
and JsonBuffer::parseArray()
have been pulled down to the derived classes DynamicJsonBuffer
and StaticJsonBufferBase
.
This means that if you have code like:
void myFunction(JsonBuffer& jsonBuffer);
you need to replace it by one of the following:
void myFunction(DynamicJsonBuffer& jsonBuffer);
void myFunction(StaticJsonBufferBase& jsonBuffer);
template<typename TJsonBuffer> void myFunction(TJsonBuffer& jsonBuffer);
How to use the new Stream
feature?
If you have something like:
char json[256];
size_t n= stream.readBytes(json, sizeof(json));
json[n] = 0;
JsonObject& root = jsonBuffer.parseObject(json);
then you can replace by:
JsonObject& root = jsonBuffer.parseObject(stream);
but don't forget to increase the size of the JsonBuffer
because it now has to hold a copy of the input.
ArduinoJson 5.7.3
ArduinoJson 5.7.2
ArduinoJson 5.7.1
Changes since 5.7.0
ArduinoJson 5.7.0
Changes since v5.6.7
- Templatized all functions using
String
orstd::string
- Removed
ArduinoJson::String
- Removed
JsonVariant::defaultValue<T>()
- Removed non-template
JsonObject::get()
andJsonArray.get()
- Fixed support for
StringSumHelper
(issue #184) - Replaced
ARDUINOJSON_USE_ARDUINO_STRING
byARDUINOJSON_ENABLE_STD_STRING
andARDUINOJSON_ENABLE_ARDUINO_STRING
(issue #378) - Added example
StringExample.ino
to show whereString
can be used - Increased default nesting limit to 50 when compiled for a computer (issue #349)
BREAKING CHANGES:
The non-template functions JsonObject::get()
and JsonArray.get()
have been removed. This means that you need to explicitely tell the type you expect in return.
Old code:
#define ARDUINOJSON_USE_ARDUINO_STRING 0
JsonVariant value1 = myObject.get("myKey");
JsonVariant value2 = myArray.get(0);
New code:
#define ARDUINOJSON_ENABLE_ARDUINO_STRING 0
#define ARDUINOJSON_ENABLE_STD_STRING 1
JsonVariant value1 = myObject.get<JsonVariant>("myKey");
JsonVariant value2 = myArray.get<JsonVariant>(0);