Renamed function RawJson() to serialized()

This commit is contained in:
Benoit Blanchon
2018-07-12 09:08:20 +02:00
parent 765752261c
commit 87fa87d87b
59 changed files with 842 additions and 550 deletions

View File

@ -37,8 +37,9 @@ void setup() {
// JsonBuffer.
obj["sensor"] = F("gps");
// It works with RawJson too:
obj["sensor"] = RawJson(F("\"gps\""));
// It works with serialized() too:
obj["sensor"] = serialized(F("\"gps\""));
obj["sensor"] = serialized(F("\xA3gps"), 3);
// You can compare the content of a JsonVariant to a Flash String
if (obj["sensor"] == F("gps")) {

View File

@ -41,8 +41,8 @@ void setup() {
// WARNING: the content of the String will be duplicated in the JsonBuffer.
obj["sensor"] = sensor;
// It works with RawJson too:
obj["sensor"] = RawJson(sensor);
// It works with serialized() too:
obj["sensor"] = serialized(sensor);
// You can also concatenate strings
// WARNING: the content of the String will be duplicated in the JsonBuffer.