cloudant / sync-android

A JSON-based document datastore for Android applications
Apache License 2.0
267 stars 91 forks source link

Saving Revision in Cloudant Sync as an ordered LinkedHashMap, but not keeping the field's order in the server database (Cloudant), after replication #515

Closed RHV044 closed 7 years ago

RHV044 commented 7 years ago

I have already post this issue on StackOverflow: http://stackoverflow.com/questions/42729853/saving-revision-in-cloudant-sync-as-an-ordered-linkedhashmap-but-not-keeping-th

Does anyone know if cloudant sync keeps the order of the LinkedHashTable when saving the revision and during replication?

Thanks!

ricellis commented 7 years ago

No, the order isn't preserved as outlined in the StackOverflow answer.

Is this causing a particular problem for you? It would be interesting even though I don't think the library is doing anything wrong since the RFC7159 JSON specification states in the introduction:

An object is an unordered collection ...

and continues in the description of objects:

Implementations whose behavior does not depend on member ordering will be interoperable in the sense that they will not be affected by these differences.