forked from bblanchon/ArduinoJson
Renamed function RawJson()
to serialized()
This commit is contained in:
@ -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")) {
|
||||
|
@ -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.
|
||||
|
Reference in New Issue
Block a user