Code Monkey home page Code Monkey logo

Comments (5)

mobizt avatar mobizt commented on August 25, 2024 2

The new version of library is ready for update.

With the new version, your code can be

  FirebaseJson &json = firebaseData.jsonObject();
  FirebaseJsonData data;

  json.get(data, "startA");
  if (data.success && data.type == "int")
    startA = data.intValue;

  json.get(data, "endA");
  if (data.success && data.type == "int")
    endA = data.intValue;

  json.get(data, "sunA");
  if (data.success && data.type == "int")
    sunA = data.intValue;

  json.get(data, "monA");
  if (data.success && data.type == "int")
    monA = data.intValue;

  json.get(data, "tueA");
  if (data.success && data.type == "int")
    tueA = data.intValue;

  json.get(data, "wedA");
  if (data.success && data.type == "int")
    wedA = data.intValue;

  json.get(data, "thuA");
  if (data.success && data.type == "int")
    thuA = data.intValue;

  json.get(data, "friA");
  if (data.success && data.type == "int")
    friA = data.intValue;

  json.get(data, "satA");
  if (data.success && data.type == "int")
    satA = data.intValue;

  json.get(data, "tempA");
  if (data.success && data.type == "int")
    tempA = data.intValue;

from firebase-esp8266.

Gizmodo avatar Gizmodo commented on August 25, 2024 1

FirebaseJson.cpp contains error.
Check line 496.

case JSMN_PRIMITIVE:
strcpy_P(tmp, FirebaseJson_STR_7);
if (strcmp(_jsonObj.stringValue.c_str(), tmp) == 0)
{
typeSet = true;
_jsonObj.boolValue = true;
strcpy_P(buf, FirebaseJson_STR_15);
}
else
{
memset(tmp, 0, 20);
strcpy_P(tmp, FirebaseJson_STR_6);
if (strcmp(_jsonObj.stringValue.c_str(), tmp) == 0)
{
typeSet = true;
_jsonObj.boolValue = false;
strcpy_P(buf, FirebaseJson_STR_15);
}
}

from firebase-esp8266.

mobizt avatar mobizt commented on August 25, 2024

@Gizmodo, thanks for your contributions and pull request.
As I said that the library is nearly finish the update but from stress test, the library can occasionally cause the stack overflow on ESP8266 but works well on ESP32. Here is the FirebaseJson library that is the part of this Firebase library.

The next update was delayed. You can pull the request again to fix the current issue.

from firebase-esp8266.

Gizmodo avatar Gizmodo commented on August 25, 2024

@mobizt PR is ready.

from firebase-esp8266.

mobizt avatar mobizt commented on August 25, 2024

Thanks, I merged it.

from firebase-esp8266.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.