Sfoglia il codice sorgente

JsonParseExample: use a `const char*` instead of a `char[]`

Benoit Blanchon 2 anni fa
parent
commit
bd2d232b40
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      examples/JsonParserExample/JsonParserExample.ino

+ 1 - 1
examples/JsonParserExample/JsonParserExample.ino

@@ -18,7 +18,7 @@ void setup() {
   JsonDocument doc;
   JsonDocument doc;
 
 
   // JSON input string.
   // JSON input string.
-  char json[] =
+  const char* json =
       "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
       "{\"sensor\":\"gps\",\"time\":1351824120,\"data\":[48.756080,2.302038]}";
 
 
   // Deserialize the JSON document
   // Deserialize the JSON document