Skip to content

Releases: bblanchon/ArduinoJson

ArduinoJson 5.8.0

03 Jan 21:49
Compare
Choose a tag to compare

Changes since 5.7.3

  • Added operator == to compare JsonVariant and strings (issue #402)
  • Added support for Stream (issue #300)
  • Reduced memory consumption by not duplicating spaces and comments

View version history

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

10 Dec 15:02
Compare
Choose a tag to compare

Changes since 5.7.2

  • Added an printTo(char[N]) and prettyPrintTo(char[N]) (issue #292)
  • Added ability to set a nested value like this: root["A"]["B"] = "C" (issue #352)
  • Renamed *.ipp to *Impl.hpp because they were ignored by Arduino IDE (issue #396)

View version history

ArduinoJson 5.7.2

23 Nov 20:56
Compare
Choose a tag to compare

Changes since 5.7.1

  • Made PROGMEM available on more platforms (issue #381)
  • Fixed PROGMEM causing an exception on ESP8266 (issue #383)

View version history

ArduinoJson 5.7.1

13 Nov 19:26
Compare
Choose a tag to compare

Changes since 5.7.0

  • Added support for PROGMEM (issue #76)
  • Fixed compilation error when index is not an int (issue #381)

View version history

ArduinoJson 5.7.0

06 Nov 16:55
Compare
Choose a tag to compare

Changes since v5.6.7

  • 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
  • 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);

View version history

ArduinoJson 5.6.7

20 Sep 08:14
Compare
Choose a tag to compare

Changes since v5.6.6

  • Fixed array[idx].as<JsonVariant>() and object[key].as<JsonVariant>()
  • Fixed return value of JsonObject::set() (issue #350)
  • Fixed undefined behavior in Prettyfier and Print (issue #354)
  • Fixed parser that incorrectly rejected floats containing a + (issue #349)

View version history

ArduinoJson 5.6.6

29 Aug 18:58
Compare
Choose a tag to compare

Changes since v5.6.5

  • Fixed -Wparentheses warning introduced in v5.6.5 (PR #335 by @nuket)
  • Added .mbedignore for ARM mbdeb (PR #334 by @nuket)
  • Fixed JsonVariant::success() which didn't propagate JsonArray::success() nor JsonObject::success() (issue #342).

View version history

ArduinoJson 5.6.5

15 Aug 10:28
Compare
Choose a tag to compare

Changes since v5.6.4

  • as<char*>() now returns true when input is null (issue #330)

View version history

ArduinoJson 5.6.4

20 Jul 11:19
Compare
Choose a tag to compare

Changes since v5.6.3

  • Fixed error in float serialization (issue #324)

View version history

ArduinoJson 5.6.3

19 Jul 07:04
Compare
Choose a tag to compare

Changes since v5.6.2

  • Improved speed of float serialization (about twice faster)
  • Added as<JsonArray>() as a synonym for as<JsonArray&>()... (issue #291)
  • Fixed call of overloaded isinf(double&) is ambiguous (issue #284)

View version history