Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working (json5 calls need to be updated to json 6) #5

Open
therealsputnik opened this issue May 19, 2020 · 1 comment
Open

Not working (json5 calls need to be updated to json 6) #5

therealsputnik opened this issue May 19, 2020 · 1 comment

Comments

@therealsputnik
Copy link

This project was EXACTLY what I was looking for, but of course it doesn't work :(
Arduino IDE complains that JSON 5 calls need to be upgraded to JSON 6. Unfortunately I'm not sufficiently skilled to make the necessary modifications to get it to work (not for lack of trying).

Will no longer compile:


btc-ticker-esp8266:240:11: error: StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6

     StaticJsonBuffer<768> jsonBuffer;

       ^

exit status 1
StaticJsonBuffer is a class from ArduinoJson 5. Please see arduinojson.org/upgrade to learn how to upgrade your program to ArduinoJson version 6


E:\Apps\Arduino Stuff\Arduino BitCoin 7 Segment Ticker\btc-ticker-esp8266-master\btc-ticker-esp8266-master\btc-ticker-esp8266\btc-ticker-esp8266.ino: In function 'void loop()':

btc-ticker-esp8266:242:39: error: 'class ArduinoJson6152_0000010::StaticJsonDocument<768u>' has no member named 'parseObject'

     JsonObject& root = jsonBuffer.parseObject(line);

                                   ^

btc-ticker-esp8266:243:43: error: 'class ArduinoJson6152_0000010::StaticJsonDocument<768u>' has no member named 'parseArray'

     JsonArray& rootarray = jsonBuffer.parseArray(line);

                                       ^

btc-ticker-esp8266:253:42: error: 'class ArduinoJson6152_0000010::StaticJsonDocument<768u>' has no member named 'parseObject'

       JsonObject& trade = jsonBuffer.parseObject(root["data"].as<const char*>());

                                      ^

btc-ticker-esp8266:256:22: error: 'ArduinoJson::JsonObject' has no member named 'success'

       if (!trade.success()) {

                  ^

btc-ticker-esp8266:284:16: error: 'ArduinoJson::JsonObject' has no member named 'printTo'

       root.printTo(Serial);

            ^

btc-ticker-esp8266:285:21: error: 'ArduinoJson::JsonArray' has no member named 'printTo'

       rootarray.printTo(Serial);

                 ^

exit status 1
'class ArduinoJson6152_0000010::StaticJsonDocument<768u>' has no member named 'parseObject'

@nebman
Copy link
Owner

nebman commented May 20, 2020

Glad you like the project!
As for a quick workaround, you can go to the "Library Manager" inside the Arduino IDE (Ctrl+Shift+I) to select and install a ArduinoJSON version 5 release (e.g. 5.13.3 was the one I used last)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants