Firebase Json data : error message

exit status 1

'class FirebaseData' has no member named 'jsonData'

I encountered this when compiling the code on Arduino IDE. How do I resolve this error?

what code?

Which version of the Firebase library are you using - do its own examples compile correctly.

Maybe search the verbose compiler output for mention of the Firebase library to see which version is actually being picked up - sometimes there is confusion if you have multiple versions installed.

The following are my declaration and libraries:

#include <ESP8266WiFi.h>
#include <FirebaseESP8266.h>
#include <Adafruit_AMG88xx.h>
#define WIFI_SSID "iaspl"
#define WIFI_PASSWORD "password59"

FirebaseData fbdo;
FirebaseJsonArray arr;
void printResult(FirebaseData &data);
unsigned long sendDataPrevMillis = 0;
Adafruit_AMG88xx amg;

Do I need to uninstall the Firebase library?

for (size_t i = 0; i < arr.size(); i++)
Serial.print(", Value: ");

        ***FirebaseJsonData &jsonData = data.jsonData();***
        //Get the result data from FirebaseJsonArray object
        arr.get(jsonData, i);
        if (jsonData.typeNum == FirebaseJson::JSON_BOOL)
            Serial.println(jsonData.boolValue ? "true" : "false");
        else if (jsonData.typeNum == FirebaseJson::JSON_INT)
        else if (jsonData.typeNum == FirebaseJson::JSON_FLOAT)
        else if (jsonData.typeNum == FirebaseJson::JSON_DOUBLE)
            printf("%.9lf\n", jsonData.doubleValue);
        else if (jsonData.typeNum == FirebaseJson::JSON_STRING ||
                 jsonData.typeNum == FirebaseJson::JSON_NULL ||
                 jsonData.typeNum == FirebaseJson::JSON_OBJECT ||
                 jsonData.typeNum == FirebaseJson::JSON_ARRAY)

I tried to change to FirebaseJsonData but still having error :cry:

Have you tried compiling the examples that came with the library? That's the first thing to check if you suspect library version confusion.

what do u mean compiling the examples? U mean any examples on Arduino IDE relating to Json?

Usually the library has example code that shows you how to use it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.