Releases: bblanchon/ArduinoJson
ArduinoJson 5.13.5
Changes since 5.13.4
- Fixed warning "unused variable" with GCC 4.4 (issue #912)
- Fixed warning "maybe uninitialized" (issue #909)
- Added an clear message for
StaticJsonDocument
,DynamicJsonDocument
...
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v5.13.5.h
put it in your project folder - Download
ArduinoJson-v5.13.5.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v5.13.5.h
are ArduinoJson-v5.13.5.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 6.9.0
Looking for a human-readable version?
📰 Read the article on arduinojson.org
Special note ⚠️
ArduinoJson 6 requires updating code written for version 5.
See the migration guide for details.
Changes since 6.8.0-beta
- Decode escaped Unicode characters like \u00DE (issue #304, PR #791)
Many thanks to Daniel Schulte (aka @trilader) who implemented this feature. - Added option ARDUINOJSON_DECODE_UNICODE to enable it
- Converted
JsonArray::copyFrom()/copyTo()
to free functionscopyArray()
- Renamed
JsonArray::copyFrom()
andJsonObject::copyFrom()
toset()
- Renamed
JsonArray::get()
togetElement()
- Renamed
JsonArray::add()
(without arg) toaddElement()
- Renamed
JsonObject::get()
togetMember()
- Renamed
JsonObject::getOrCreate()
togetOrAddMember()
- Fixed
JsonVariant::isNull()
not returningtrue
afterset((char*)0)
- Fixed segfault after
variant.set(serialized((char*)0))
- Detect
IncompleteInput
infalse
,true
, andnull
- Added
JsonDocument::size()
- Added
JsonDocument::remove()
- Added
JsonVariant::clear()
- Added
JsonVariant::remove()
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v6.9.0.h
put it in your project folder - Download
ArduinoJson-v6.9.0.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v6.9.0.h
are ArduinoJson-v6.9.0.hpp
are almost identical; the difference is that the .hpp
keeps everything in the ArduinoJson
namespace.
Try online
ArduinoJson 6.8.0-beta
Looking for a human-readable version?
📰 Read the article on arduinojson.org
Special note ⚠️
ArduinoJson 6 requires updating code written for version 5.
See the migration guide for details.
Changes since 6.7.0-beta
- Import functions in the ArduinoJson namespace to get clearer errors
- Improved syntax highlighting in Arduino IDE
- Removed default capacity of
DynamicJsonDocument
JsonArray::copyFrom()
acceptsJsonArrayConst
JsonVariant::set()
acceptsJsonArrayConst
andJsonObjectConst
JsonDocument
was missing in the ArduinoJson namespace- Added
memoryUsage()
toJsonArray
,JsonObject
, andJsonVariant
- Added
nesting()
toJsonArray
,JsonDocument
,JsonObject
, andJsonVariant
- Replaced
JsonDocument::nestingLimit
with an additional parameter
todeserializeJson()
anddeserializeMsgPack()
- Fixed uninitialized variant in
JsonDocument
- Fixed
StaticJsonDocument
copy constructor and copy assignment - The copy constructor of
DynamicJsonDocument
chooses the capacity according to the memory usage of the source, not from the capacity of the source. - Added the ability to create/assign a
StaticJsonDocument
/DynamicJsonDocument
from aJsonArray
/JsonObject
/JsonVariant
- Added
JsonDocument::isNull()
- Added
JsonDocument::operator[]
- Added
ARDUINOJSON_TAB
to configure the indentation character - Reduced the size of the pretty JSON serializer
- Added
add()
,createNestedArray()
andcreateNestedObject()
toJsonVariant
JsonVariant
automatically promotes toJsonObject
orJsonArray
on write.
CallingJsonVariant::to<T>()
is not required anymore.JsonDocument
now support the same operations asJsonVariant
.
CallingJsonDocument::as<T>()
is not required anymore.- Fixed example
JsonHttpClient.ino
- User can now use a
JsonString
as a key or a value
BREAKING CHANGES ⚠️
DynamicJsonDocument
's constructor
The parameter to the constructor of DynamicJsonDocument
is now mandatory
Old code:
DynamicJsonDocument doc;
New code:
DynamicJsonDocument doc(1024);
Nesting limit
JsonDocument::nestingLimit
was replaced with a new parameter to deserializeJson()
and deserializeMsgPack()
.
Old code:
doc.nestingLimit = 15; deserializeJson(doc, input);
New code:
deserializeJson(doc, input, DeserializationOption::NestingLimit(15));
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v6.8.0-beta.h
put it in your project folder - Download
ArduinoJson-v6.8.0-beta.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v6.8.0-beta.h
are ArduinoJson-v6.8.0-beta.hpp
are almost identical; the difference is that the .hpp
keeps everything in the ArduinoJson
namespace.
Try online
ArduinoJson 6.7.0-beta
Looking for a human-readable version?
📰 Read the article on arduinojson.org
Special note ⚠️
ArduinoJson 6 requires updating code written for version 5.
See the migration guide for details.
Changes since 6.6.0-beta
- Removed the automatic expansion of
DynamicJsonDocument
, it now has a fixed capacity. - Restored the monotonic allocator because the code was getting too big
- Reduced the memory usage
- Reduced the code size
- Renamed
JsonKey
toJsonString
- Removed spurious files in the Particle library
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v6.7.0-beta.h
put it in your project folder - Download
ArduinoJson-v6.7.0-beta.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v6.7.0-beta.h
are ArduinoJson-v6.7.0-beta.hpp
are almost identical; the difference is that the .hpp
keeps everything in the ArduinoJson
namespace.
Try online
ArduinoJson 5.13.4
Changes since 5.13.3
- Removed spurious files in the Particle library
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v5.13.4.h
put it in your project folder - Download
ArduinoJson-v5.13.4.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v5.13.4.h
are ArduinoJson-v5.13.4.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 6.6.0-beta
Looking for a human-readable version?
📰 Read the article on arduinojson.org
Special note ⚠️
ArduinoJson 6 requires updating code written for version 5.
See the migration guide for details.
Changes since 6.5.0-beta
- Removed
JsonArray::is<T>(i)
andJsonArray::set(i,v)
- Removed
JsonObject::is<T>(k)
andJsonObject::set(k,v)
- Replaced
T JsonArray::get<T>(i)
withJsonVariant JsonArray::get(i)
- Replaced
T JsonObject::get<T>(k)
withJsonVariant JsonObject::get(k)
- Added
JSON_STRING_SIZE()
- Replacing or removing a value now releases the memory
- Added
DeserializationError::code()
to be used in switch statements (issue #846)
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v6.6.0-beta.h
put it in your project folder - Download
ArduinoJson-v6.6.0-beta.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v6.6.0-beta.h
are ArduinoJson-v6.6.0-beta.hpp
are almost identical; the difference is that the .hpp
keeps everything in the ArduinoJson
namespace.
Try online
ArduinoJson 6.5.0-beta
Special note ⚠️
ArduinoJson 6 requires updating code written for version 5.
See the migration guide for details.
Changes since 6.4.0-beta
- Added implicit conversion from
JsonArray
andJsonObject
toJsonVariant
- Allow mixed configuration in compilation units (issue #809)
- Fixed object keys not being duplicated
JsonPair::key()
now returns aJsonKey
- Increased the default capacity of
DynamicJsonDocument
- Fixed
JsonVariant::is<String>()
(closes #763) - Added
JsonArrayConst
,JsonObjectConst
, andJsonVariantConst
- Added copy-constructor and copy-assignment-operator for
JsonDocument
(issue #827)
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v6.5.0-beta.h
put it in your project folder - Download
ArduinoJson-v6.5.0-beta.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v6.5.0-beta.h
are ArduinoJson-v6.5.0-beta.hpp
are almost identical; the difference is that the .hpp
keeps everything in the ArduinoJson
namespace.
Try online
ArduinoJson 5.13.3
Changes since 5.13.2
- Improved float serialization when
-fsingle-precision-constant
is used - Fixed
JsonVariant::is<int>()
that returned true for empty strings - Fixed
JsonVariant::is<String>()
(closes #763)
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v5.13.3.h
put it in your project folder - Download
ArduinoJson-v5.13.3.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v5.13.3.h
are ArduinoJson-v5.13.3.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 6.4.0-beta
Special note ⚠️
ArduinoJson 6 requires updating code written for version 5.
See the migration guide for details.
Changes since 6.3.0-beta
- Copy
JsonArray
andJsonObject
, instead of storing pointers (issue #780) - Added
JsonVariant::to<JsonArray>()
andJsonVariant::to<JsonObject>()
- Fixed "-0" (issue #808)
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v6.4.0-beta.h
put it in your project folder - Download
ArduinoJson-v6.4.0-beta.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v6.4.0-beta.h
are ArduinoJson-v6.4.0-beta.hpp
are almost identical; the difference is that the .hpp
keeps everything in the ArduinoJson
namespace.
Try online
ArduinoJson 6.3.0-beta
Special note ⚠️
ArduinoJson 6 requires updating code written for version 5.
See the migration guide for details.
Changes since 6.2.3-beta
- Implemented reference semantics for
JsonVariant
- Replace
JsonPair
'skey
andvalue
withkey()
andvalue()
- Fixed
serializeJson(obj[key], dst)
(issue #794)
BREAKING CHANGES ⚠️
JsonVariant
JsonVariant
now has a semantic similar to JsonObject
and JsonArray
.
It's a reference to a value stored in the JsonDocument
.
As a consequence, a JsonVariant
cannot be used as a standalone variable anymore.
Old code:
JsonVariant myValue = 42;
New code:
DynamicJsonDocument doc;
JsonVariant myValue = doc.to<JsonVariant>();
myValue.set(42);
JsonPair
Old code:
for(JsonPair p : myObject) {
Serial.println(p.key);
Serial.println(p.value.as<int>());
}
New code:
for(JsonPair p : myObject) {
Serial.println(p.key());
Serial.println(p.value().as<int>());
}
CAUTION: the key is now read only!
How to install
There are several ways to install ArduinoJson, from simpler to more complex:
- Use the Arduino Library Manager
- Download
ArduinoJson-v6.3.0-beta.h
put it in your project folder - Download
ArduinoJson-v6.3.0-beta.zip
and extract it in youlibraries
folder
Note: ArduinoJson-v6.3.0-beta.h
are ArduinoJson-v6.3.0-beta.hpp
are almost identical; the difference is that the .hpp
keeps everything in the ArduinoJson
namespace.