Skip to content

Releases: bblanchon/ArduinoJson

ArduinoJson 6.2.2-beta

18 Jul 19:12
Compare
Choose a tag to compare
Pre-release

Special note ⚠️

ArduinoJson 6 requires updating code written for version 5.
Visit arduinojson.org for more information.

Changes since 6.2.1-beta

  • Fixed invalid application of 'sizeof' to incomplete type '__FlashStringHelper' (issue #783)
  • Fixed char[] not duplicated when passed to JsonVariant::operator[]

View version history

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v6.2.2-beta.h put it in your project folder
  3. Download ArduinoJson-v6.2.2-beta.zip and extract it in you libraries folder

Note: ArduinoJson-v6.2.2-beta.h are ArduinoJson-v6.2.2-beta.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

Try online

ArduinoJson 6.2.1-beta

17 Jul 08:33
Compare
Choose a tag to compare
Pre-release

Special note ⚠️

ArduinoJson 6 requires updating code written for version 5.
Visit arduinojson.org for more information.

Changes since 6.2.0-beta

  • Fixed JsonObject not inserting keys of type String (issue #782)

View version history

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v6.2.1-beta.h put it in your project folder
  3. Download ArduinoJson-v6.2.1-beta.zip and extract it in you libraries folder

Note: ArduinoJson-v6.2.1-beta.h are ArduinoJson-v6.2.1-beta.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

Try online

ArduinoJson 6.2.0-beta

12 Jul 07:34
Compare
Choose a tag to compare
Pre-release

Special note ⚠️

ArduinoJson 6 requires updating code written for version 5.
Visit arduinojson.org for more information.

Changes since 6.1.0-beta

  • Disabled lazy number deserialization (issue #772)
  • Improved float serialization when -fsingle-precision-constant is used
  • Renamed function RawJson() to serialized()
  • serializeMsgPack() now supports values marked with serialized()

View version history

BREAKING CHANGES ⚠️

Non quoted strings

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.

Preformatted values

Old code:

object["values"] = RawJson("[1,2,3,4]");

New code:

object["values"] = serialized("[1,2,3,4]");

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v6.2.0-beta.h put it in your project folder
  3. Download ArduinoJson-v6.2.0-beta.zip and extract it in you libraries folder

Note: ArduinoJson-v6.2.0-beta.h are ArduinoJson-v6.2.0-beta.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

Try online

ArduinoJson 6.1.0-beta

02 Jul 08:05
Compare
Choose a tag to compare
Pre-release

Special note ⚠️

ArduinoJson 6 requires updating code written for version 5.
Visit arduinojson.org for more information.

Changes since 6.0.1-beta

  • Return JsonArray and JsonObject by value instead of reference (issue #309)
  • Replaced success() with isNull()

View version history

BREAKING CHANGES ⚠️

Old code:

JsonObject& obj = doc.to<JsonObject>();
JsonArray& arr = obj.createNestedArray("key");
if (!arr.success()) {
  Serial.println("Not enough memory");
  return;
}

New code:

JsonObject obj = doc.to<JsonObject>();
JsonArray arr = obj.createNestedArray("key");
if (arr.isNull()) {
  Serial.println("Not enough memory");
  return;
}

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v6.1.0-beta.h put it in your project folder
  3. Download ArduinoJson-v6.1.0-beta.zip and extract it in you libraries folder

Note: ArduinoJson-v6.1.0-beta.h are ArduinoJson-v6.1.0-beta.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

Try online

ArduinoJson 6.0.1-beta

11 Jun 10:35
Compare
Choose a tag to compare
Pre-release

Special note ⚠️

ArduinoJson 6 requires updating code written for version 5.
Visit arduinojson.org for more information.

Changes since 6.0.0-beta

  • Fixed conflicts with isnan() and isinf() macros (issue #752)

View version history

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v6.0.1-beta.h put it in your project folder
  3. Download ArduinoJson-v6.0.1-beta.zip and extract it in you libraries folder

Note: ArduinoJson-v6.0.1-beta.h are ArduinoJson-v6.0.1-beta.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

Try online

ArduinoJson 6.0.0-beta

07 Jun 09:20
Compare
Choose a tag to compare
Pre-release

Summary

This release is the first of a new major revision of the library.
It adds new features, like:

  1. MessagePack serialization and deserialization,
  2. Error code to tell why deserialization failed,
  3. Support for non zero terminated input.

Unfortunately, it requires changing the existing programs; please see the "breaking changes" section below.

More information on arduinojson.org

Changes since 5.13.2

  • Added DynamicJsonDocument and StaticJsonDocument
  • Added deserializeJson()
  • Added serializeJson() and serializeJsonPretty()
  • Added measureJson() and measureJsonPretty()
  • Added serializeMsgPack(), deserializeMsgPack() and measureMsgPack() (issue #358)
  • Added example MsgPackParser.ino (issue #358)
  • Added support for non zero-terminated strings (issue #704)
  • Removed JsonBuffer::parseArray(), parseObject() and parse()
  • Removed JsonBuffer::createArray() and createObject()
  • Removed printTo() and prettyPrintTo()
  • Removed measureLength() and measurePrettyLength()
  • Removed all deprecated features

BREAKING CHANGES ⚠️

Deserialization

Old code:

DynamicJsonBuffer jb;
JsonObject& obj = jb.parseObject(json);
if (obj.success()) {

}

New code:

DynamicJsonDocument doc;
DeserializationError error = deserializeJson(doc, json);
if (error) {

}
JsonObject& obj = doc.as<JsonObject>();

Serialization

Old code:

DynamicJsonBuffer jb;
JsonObject& obj = jb.createObject();
obj["key"] = "value";
obj.printTo(Serial);

New code:

DynamicJsonDocument obj;
JsonObject& obj = doc.to<JsonObject>();
obj["key"] = "value";
serializeJson(doc, Serial);

View version history

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v6.0.0-beta.h put it in your project folder
  3. Download ArduinoJson-v6.0.0-beta.zip and extract it in you libraries folder

Note: ArduinoJson-v6.0.0-beta.h are ArduinoJson-v6.0.0-beta.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

Try online

ArduinoJson 5.13.2

01 Jun 07:43
Compare
Choose a tag to compare

Changes since 5.13.1

  • Fixed JsonBuffer::parse() not respecting nesting limit correctly (issue #693)
  • Fixed inconsistencies in nesting level counting (PR #695 from Zhenyu Wu)
  • Fixed null values that could be pass to strcmp() (PR #745 from Mike Karlesky)
  • Added macros ARDUINOJSON_VERSION, ARDUINOJSON_VERSION_MAJOR...

View version history

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v5.13.2.h put it in your project folder
  3. Download ArduinoJson-v5.13.2.zip and extract it in you libraries folder

Note: ArduinoJson-v5.13.2.h are ArduinoJson-v5.13.2.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

ℹ️ The complete documentation is available on arduinojson.org

Try online

ArduinoJson 5.13.1

19 Feb 08:03
Compare
Choose a tag to compare

Changes since 5.13.0

  • Fixed JsonVariant::operator|(int) that returned the default value if the variant contained a double (issue #675)
  • Allowed non-quoted key to contain underscores (issue #665)

View version history

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v5.13.1.h put it in your project folder
  3. Download ArduinoJson-v5.13.1.zip and extract it in you libraries folder

Note: ArduinoJson-v5.13.1.h are ArduinoJson-v5.13.1.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

ℹ️ The complete documentation is available on arduinojson.org

Try online

ArduinoJson 5.13.0

19 Jan 14:43
Compare
Choose a tag to compare

Changes since 5.12.0

  • Changed the rules of string duplication (issue #658)
  • RawJson() accepts any kind of string and obeys to the same rules for duplication
  • Changed the return type of strdup() to const char* to prevent double duplication
  • Marked strdup() as deprecated

New rules for string duplication

type duplication
const char* no
char* no yes
String yes
std::string yes
const __FlashStringHelper* yes

These new rules make JsonBuffer::strdup() useless.

View version history

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v5.13.0.h put it in your project folder
  3. Download ArduinoJson-v5.13.0.zip and extract it in you libraries folder

Note: ArduinoJson-v5.13.0.h are ArduinoJson-v5.13.0.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

ℹ️ The complete documentation is available on arduinojson.org

Try online

ArduinoJson 5.12.0

11 Dec 17:04
Compare
Choose a tag to compare

Changes since 5.11.2

  • Added JsonVariant::operator| to return a default value (see below)
  • Added a clear error message when compiled as C instead of C++ (issue #629)
  • Added detection of MPLAB XC compiler (issue #629)
  • Added detection of Keil ARM Compiler (issue #629)
  • Added an example that shows how to save and load a configuration file
  • Reworked all other examples

How to use the new feature?

If you have a block like this:

const char* ssid = root["ssid"];
if (!ssid)
  ssid = "default ssid";

You can simplify like that:

const char* ssid = root["ssid"] | "default ssid";

View version history

How to install

There are several ways to install ArduinoJson, from simpler to more complex:

  1. Use the Arduino Library Manager
  2. Download ArduinoJson-v5.12.0.h put it in your project folder
  3. Download ArduinoJson-v5.12.0.zip and extract it in you libraries folder

Note: ArduinoJson-v5.12.0.h are ArduinoJson-v5.12.0.hpp are almost identical; the difference is that the .hpp keeps everything in the ArduinoJson namespace.

ℹ️ The complete documentation is available on arduinojson.org

Try online