From 85f732bd2ecabaaca824e5dcc5df38e5c053e472 Mon Sep 17 00:00:00 2001 From: suwatchai Date: Fri, 15 Nov 2019 00:40:07 +0700 Subject: [PATCH] Fix FirebaseJson set/remove bugs. --- README.md | 4 ++-- library.properties | 2 +- src/FirebaseESP8266.cpp | 4 ++-- src/FirebaseESP8266.h | 4 ++-- src/FirebaseJson.cpp | 8 ++++---- src/FirebaseJson.h | 4 ++-- src/README.md | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index c3b0eefa..4281dc27 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Firebase Realtime Database Arduino Library for ESP8266 -Google's Firebase Realtime Database Arduino Library for ESP8266 v 2.6.9 +Google's Firebase Realtime Database Arduino Library for ESP8266 v 2.7.0 This library supports ESP8266 MCU from Espressif. The following are platforms which library are also available. @@ -48,7 +48,7 @@ This library supports ESP8266 MCU from Espressif. The following are platforms wh ## Changes from earlier version -For library v 2.6.9 (comes with FirebaseJson v 2.2.6) or later, FirebaseJson object will be used to handle JSON data instead of JSON string which, the following functions are affected: +For library v 2.7.0 (comes with FirebaseJson v 2.2.7) or later, FirebaseJson object will be used to handle JSON data instead of JSON string which, the following functions are affected: getJson, setJson, pushJson, updateNode and updateNodeSilent. diff --git a/library.properties b/library.properties index 61585c2d..dadfbc2e 100644 --- a/library.properties +++ b/library.properties @@ -1,6 +1,6 @@ name=Firebase ESP8266 Client -version=2.6.9 +version=2.7.0 author=Mobizt diff --git a/src/FirebaseESP8266.cpp b/src/FirebaseESP8266.cpp index 20e5eb9e..e7ff65b6 100644 --- a/src/FirebaseESP8266.cpp +++ b/src/FirebaseESP8266.cpp @@ -1,7 +1,7 @@ /* - * Google's Firebase Realtime Database Arduino Library for ESP8266, version 2.6.9 + * Google's Firebase Realtime Database Arduino Library for ESP8266, version 2.7.0 * - * November 14, 2019 + * November 15, 2019 * * Feature Added: * diff --git a/src/FirebaseESP8266.h b/src/FirebaseESP8266.h index 20c4bc8c..72569110 100644 --- a/src/FirebaseESP8266.h +++ b/src/FirebaseESP8266.h @@ -1,7 +1,7 @@ /* - * Google's Firebase Realtime Database Arduino Library for ESP8266, version 2.6.9 + * Google's Firebase Realtime Database Arduino Library for ESP8266, version 2.7.0 * - * November 14, 2019 + * November 15, 2019 * * Feature Added: * diff --git a/src/FirebaseJson.cpp b/src/FirebaseJson.cpp index 10982bbd..9f0e5a7e 100644 --- a/src/FirebaseJson.cpp +++ b/src/FirebaseJson.cpp @@ -1,9 +1,9 @@ /* - * FirebaseJson, version 2.2.6 + * FirebaseJson, version 2.2.7 * * The Easiest ESP8266/ESP32 Arduino library for parse, create and edit JSON object using relative path. * - * November 14, 2019 + * November 15, 2019 * * Features * - None recursive operations @@ -628,7 +628,7 @@ bool FirebaseJson::_updateTkIndex(uint16_t index, int &depth, char *searchKey, i _el.erase(_el.begin()); if (printMode != PRINT_MODE_NONE && !skip) { - if (len > 0) + if (len > 0 && !_arrReplaced) { if (ref) _jsonData._dbuf += _cm; @@ -650,7 +650,7 @@ bool FirebaseJson::_updateTkIndex(uint16_t index, int &depth, char *searchKey, i if (!_arrReplaced) { - if (_el[i].type == JSMN_OBJECT && !_arrReplaced) + if (_el[i].type == JSMN_OBJECT) { if (printMode == PRINT_MODE_PRETTY) { diff --git a/src/FirebaseJson.h b/src/FirebaseJson.h index ec80c539..b6a251c8 100644 --- a/src/FirebaseJson.h +++ b/src/FirebaseJson.h @@ -1,9 +1,9 @@ /* - * FirebaseJson, version 2.2.6 + * FirebaseJson, version 2.2.7 * * The Easiest ESP8266/ESP32 Arduino library for parse, create and edit JSON object using relative path. * - * November 14, 2019 + * November 15, 2019 * * Features * - None recursive operations diff --git a/src/README.md b/src/README.md index c0e319a4..11d82102 100644 --- a/src/README.md +++ b/src/README.md @@ -1,7 +1,7 @@ # Firebase Realtime Database Arduino Library for ESP8266 -Google's Firebase Realtime Database Arduino Library for ESP8266 v 2.6.9 +Google's Firebase Realtime Database Arduino Library for ESP8266 v 2.7.0 ## Global functions