Closed PrMinisterGR closed 4 years ago
First of all you should not be concerned about this order, because cfDictionary is not supposed to be order-sensitive.
Now here is your answer. Before the plist generators write the dictionary, they sort it by key just so that the results are always the same no matter the order one assigned the dictionary. Now "p" goes before "u" in the alphabet, so "password" comes before "username".
I guessed as much later. Thanks for the reply, it will be really useful for people using this for the first time with no previous plist experience :)
Indeed! Thanks @Artoria2e5 for the answer. :smile:
Hello. This is my data structure:
This is the code that adds the data to it:
This is how I marshal it:
When I print it, I get the plist with the data in the reverse order.
Hopefully I'm doing something obviously wrong.
Here is my data structure simply printed with Println:
Everything looks in the correct order in the data structure.
Reversing it from my data structure makes zero difference in the output.
Println will correctly print the data structure elements in the reverse order:
Which makes no difference to Marshal:
Thanks for the library, first of all. Do you have any ideas? Am I screwing up something?