Skip to content

Releases: bblanchon/ArduinoJson

ArduinoJson 5.9.0

24 Apr 19:51
Compare
Choose a tag to compare

Changes since 5.8.4

  • Added JsonArray::remove(iterator) (issue #479)
  • Added JsonObject::remove(iterator)
  • Renamed JsonArray::removeAt(size_t) into remove(size_t) ⚠️
  • Renamed folder include/ to src/
  • Fixed warnings floating constant exceeds range of floatand floating constant truncated to zero (issue #483)
  • Removed Print class and converted printTo() 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)

⚠️ = breaking change, you may need to change your code.

View version history

ArduinoJson 5.8.4

26 Mar 19:45
Compare
Choose a tag to compare

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)

View version history

🆕 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 the ArduinoJson namespace
  • ArduinoJson-v5.8.4.h is the same but adds a using namespace ArduinoJson

If you don't know which one to pick, choose the .h

ArduinoJson 5.8.3

11 Feb 14:15
Compare
Choose a tag to compare

Changes since 5.8.2

  • Fixed an access violation in DynamicJsonBuffer when memory allocation fails (issue #433)
  • Added operators == and != for two JsonVariants (issue #436)
  • Fixed JsonVariant::operator[const FlashStringHelper*] (issue #441)

View version history

ArduinoJson 5.8.2

22 Jan 17:15
Compare
Choose a tag to compare

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 a char[] (issue #423)
  • Reduced code size when using const references
  • Fixed error with string of type unsigned char* (issue #428)
  • Added deprecated attribute on asArray(), asObject() and asString() (issue #420)

View version history

How to replace deprecated functions?

Old Name New Name
asArray() as<JsonArray>()
asObject() as<JsonObject>()
asString() as<char*>()

ArduinoJson 5.8.1

15 Jan 20:06
Compare
Choose a tag to compare

Changes since 5.8.0

  • Fixed error when assigning a volatile int to a JsonVariant (issue #415)
  • Fixed errors with Variable Length Arrays (issue #416)
  • Fixed error when both ARDUINOJSON_ENABLE_STD_STREAM and ARDUINOJSON_ENABLE_ARDUINO_STREAM are set to 1
  • Fixed error "Stream does not name a type" (issue #412)

View version history

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