gonzalezreal / Groot

From JSON to Core Data and back.
Other
534 stars 61 forks source link

Preserving order #53

Closed scriptease closed 8 years ago

scriptease commented 8 years ago

Hello,

first of all thanks for the great project!

I have a question, is it somehow possible to preserve the order in the json? Since core data only provides sets it would be great to e.g. set an index in the relationship.

Is something like that possible?

Kind regards, Florian

ManueGE commented 8 years ago

In these cases I just set the relationship as ordered in the model. Then it is parsed as NSOrderedSet and the JSON order is preserved.

scriptease commented 8 years ago

Thanks, that works for relations :-), and for a list of root objects i just set the index manually!