For example, here's how my data is stored:
When I do a GET for the data from this URL (using the REST API):
https://<redacted>.com/maps/a6c00d68a95a5043374c1017b982d8f0b3009179/data/003_teleportIns.json
The result looks like this:
[{"sequenceNumber":0,"x":8,"y":3},{"sequenceNumber":1,"x":3,"y":14},{"sequenceNumber":2,"x":11,"y":15}]
What I expected, was for the data to look like this instead:
{"0":{"sequenceNumber":0,"x":8,"y":3},"1":{"sequenceNumber":1,"x":3,"y":14},"2":{"sequenceNumber":2,"x":11,"y":15}}
Since I'm using kotlinx serialization to decode the data, the way that firebase returns the data results in errors when trying to decode.
Here's an example error:
Unexpected JSON token at offset 199: Expected start of the object '{', but had ':' instead
JSON input: .....":5,"y":7}],
"003_teleportIns":[{"sequenceNumber":0,"x":8,"y.....
kotlinx.serialization.json.internal.JsonDecodingException: Unexpected JSON token at offset 199: Expected start of the object '{', but had ':' instead
JSON input: .....":5,"y":7}],
"003_teleportIns":[{"sequenceNumber":0,"x":8,"y.....
So what gives? Why is firebase returning my data in an unexpected manor? If this is expected, please point me to the documentation.
