Skip to content

Commit

Permalink
Fix JSON object iteration issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
mobizt committed Sep 6, 2023
1 parent 4ea411c commit c798b83
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
},
"frameworks": "arduino",
"platforms": ["espressif8266", "espressif32","teensy", "atmelsam","ststm32","atmelavr","atmelmegaavr","rp2040"],
"version": "3.0.7"
"version": "3.0.8"
}
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name=FirebaseJson

version=3.0.7
version=3.0.8

author=Mobizt

Expand Down
5 changes: 4 additions & 1 deletion src/FirebaseJson.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* FirebaseJson, version 3.0.7
* FirebaseJson, version 3.0.8
*
* The Easiest Arduino library to parse, create and edit JSON object using a relative path.
*
Expand Down Expand Up @@ -456,6 +456,9 @@ void FirebaseJsonBase::mCollectIterator(MB_JSON *e, int type, int &arrIndex)
char *p = MB_JSON_PrintUnformatted(e);
if (p)
{
if (result.ofs1 == 0)
result.ofs1 = iterator_data.buf_offset;

int i = iterator_data.buf_offset;
size_t pos = buf.find(p, i);
if (pos != MB_String::npos)
Expand Down
4 changes: 2 additions & 2 deletions src/FirebaseJson.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* FirebaseJson, version 3.0.7
* FirebaseJson, version 3.0.8
*
* The Easiest Arduino library to parse, create and edit JSON object using a relative path.
*
* Created June 14, 2023
* Created September 6, 2023
*
* Features
* - Using path to access node element in search style e.g. json.get(result,"a/b/c")
Expand Down

0 comments on commit c798b83

Please sign in to comment.