Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7f0ca6b

Browse files
committed
ConfigFile - bump to ArduinoJson v7
1 parent 599cf68 commit 7f0ca6b

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

‎libraries/esp8266/examples/ConfigFile/ConfigFile.ino‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <LittleFS.h>
1313

1414
// more and possibly updated information can be found at:
15-
// https://arduinojson.org/v6/example/config/
15+
// https://arduinojson.org/v7/example/config/
1616

1717
bool loadConfig() {
1818
File configFile = LittleFS.open("/config.json", "r");
@@ -21,7 +21,7 @@ bool loadConfig() {
2121
return false;
2222
}
2323

24-
StaticJsonDocument<200> doc;
24+
JsonDocument doc;
2525
auto error = deserializeJson(doc, configFile);
2626
if (error) {
2727
Serial.println("Failed to parse config file");
@@ -42,7 +42,7 @@ bool loadConfig() {
4242
}
4343

4444
bool saveConfig() {
45-
StaticJsonDocument<200> doc;
45+
JsonDocument doc;
4646
doc["serverName"] = "api.example.com";
4747
doc["accessToken"] = "128du9as8du12eoue8da98h123ueh9h98";
4848

‎tests/common.sh‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -297,14 +297,15 @@ function install_library()
297297
{
298298
local lib_path=1ドル
299299
local name=2ドル
300-
local archive=3ドル
301-
local hash=4ドル
302-
local url=5ドル
300+
local extract=3ドル
301+
local archive=4ドル
302+
local hash=5ドル
303+
local url=6ドル
303304

304305
fetch_and_unpack "$archive" "$hash" "$url"
305306
mkdir -p "$lib_path"
306307
rm -rf "$lib_path/$name"
307-
mv "$name" "$lib_path/$name"
308+
mv "$extract" "$lib_path/$name"
308309
}
309310

310311
function install_libraries()
@@ -317,9 +318,10 @@ function install_libraries()
317318

318319
install_library "$lib_path" \
319320
"ArduinoJson" \
320-
"ArduinoJson-v6.11.5.zip" \
321-
"8b836c862e69e60c4357a5ed7cbcf1310a3bb1c6bd284fe028faaa3d9d7eed319d10febc8a6a3e06040d1c73aaba5ca487aeffe87ae9388dc4ae1677a64d602c" \
322-
"https://github.com/bblanchon/ArduinoJson/releases/download/v6.11.5/ArduinoJson-v6.11.5.zip"
321+
"ArduinoJson-7.4.1" \
322+
"ArduinoJson-v7.4.1.zip" \
323+
"1bfbc4aa3e4aa3c8e38f660333b6d5129b0443dbd0fd1eb448d14c7f041ffd2df782951ce622c6da50e2a07dcfcd268727b1f0a000211b9a5a92a806b1645bc0" \
324+
"https://github.com/bblanchon/ArduinoJson/archive/refs/tags/v7.4.1.zip"
323325

324326
popd
325327
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /