IndentedPrint, a decorator for Print to allow indented outputExample:
JsonOject<2> json;
json["key"] = "value";
json.prettyPrintTo(Serial);
JsonArray (bug introduced in v3.1).Generator::JsonObject::add() twice with the same key now replaces the valueGenerator::JsonObject::operator[], see bellow the new APIGenerator::JsonObject::remove() (issue #9)Old generator API:
JsonObject<3> root;
root.add("sensor", "gps");
root.add("time", 1351824120);
root.add("data", array);
New generator API:
JsonObject<3> root;
root["sensor"] = "gps";
root["time"] = 1351824120;
root["data"] = array;
JsonHashTable into JsonObjectJsonArray and JsonObject (issue #4)Old parser API:
JsonHashTable root = parser.parseHashTable(json);
char* sensor = root.getString("sensor");
long time = root.getLong("time");
double latitude = root.getArray("data").getDouble(0);
double longitude = root.getArray("data").getDouble(1);
New parser API:
JsonObject root = parser.parse(json);
char* sensor = root["sensor"];
long time = root["time"];
double latitude = root["data"][0];
double longitude = root["data"][1];
#include "jsmn.cpp" which caused an error in Linux (issue #6)ArduinoJsonParser becomes ArduinoJsonBreaking change: you need to add the following line at the top of your program.
using namespace ArduinoJson::Parser;
char* json into char[] json so that the bytes are not write protectedInitial release