Describe the bug
When retrieving data from a Firestore document that contains an array with dictionaries inside it, the dictionaries are not being parsed.
To Reproduce
Create a Firestore Collection
Inside the collection create a document that contains an array
Add an item to the array with key 0 and data of {"name": "someone"} with GodotFirebase
Retrieve the document using GodotFirebase collection.get().
The document will have the contents:
Expected behavior
I expect nested arrays/dictionaries to parse correctly to remove the fields property and stringValue and Firestore properties. The data returned from collection.get should look like:
{"players": [{"name": "someone"}]}
Screenshots
Debugging in Godot, this is the value of the document returned via collection.get():
How it looks in Firebase console:
Environment:
OS: Windows 10
Additional Information
It would be good to include unit tests for this too, as this regression has come up before. I fixed it in #80 and it's now reappeared since the refactor.
Describe the bug When retrieving data from a Firestore document that contains an array with dictionaries inside it, the dictionaries are not being parsed.
To Reproduce Create a Firestore Collection Inside the collection create a document that contains an array Add an item to the array with key
0
and data of{"name": "someone"}
with GodotFirebase Retrieve the document using GodotFirebasecollection.get()
. The document will have the contents:{"players":[{"fields":{"name":{"stringValue":"someone"}}}]}
Expected behavior I expect nested arrays/dictionaries to parse correctly to remove the
fields
property andstringValue
and Firestore properties. The data returned fromcollection.get
should look like:{"players": [{"name": "someone"}]}
Screenshots
Debugging in Godot, this is the value of the document returned via
collection.get()
:How it looks in Firebase console:
Environment:
Additional Information
It would be good to include unit tests for this too, as this regression has come up before. I fixed it in #80 and it's now reappeared since the refactor.