Releases: bblanchon/ArduinoJson
Releases · bblanchon/ArduinoJson
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);
ArduinoJson 5.6.7
ArduinoJson 5.6.6
ArduinoJson 5.6.5
Changes since v5.6.4
as<char*>()
now returnstrue
when input isnull
(issue #330)