RawJson() accepts any kind of string and obeys to duplication rules

This commit is contained in:
Benoit Blanchon
2018-01-18 09:43:37 +01:00
parent 7e4fcb0868
commit bae179ed67
20 changed files with 163 additions and 123 deletions

View File

@ -40,6 +40,9 @@ void setup() {
// WARNING: the content of the String will be duplicated in the JsonBuffer.
root["sensor"] = sensor;
// It works with RawJson too:
root["sensor"] = RawJson(sensor);
// You can also concatenate strings
// WARNING: the content of the String will be duplicated in the JsonBuffer.
root[String("sen") + "sor"] = String("gp") + "s";