What's the recommended way to save to file (and later reload) data in the form of objects, some of which contain lists of other objects?
My previous apps had modest data needs, so I could just read/write maps from/to a text file. Easy.
However, my new app has a lot of classes that include not just primitives but also lists of other objects, which in turn have lists of yet more objects. (That is, a non-trival data model.)
One more fun twist is that the objects contain references to each other, so I can easily navigate from one to another. (e.g. a player has a list of poker hands, and a poker hand also links back to the player)
Ideally I'd like to use something like B4XSerializator to save the objects to a file (via bytes, I assume). I know there are other possibilities too, like SQLite (although I'd like to avoid SQL if I can - I just need load/save, not queries).
However, I don't know how B4XSerializator would handle objects that link to other objects, or circular references like I described above.
Any tips greatly appreciated. Thanks!
My previous apps had modest data needs, so I could just read/write maps from/to a text file. Easy.
However, my new app has a lot of classes that include not just primitives but also lists of other objects, which in turn have lists of yet more objects. (That is, a non-trival data model.)
One more fun twist is that the objects contain references to each other, so I can easily navigate from one to another. (e.g. a player has a list of poker hands, and a poker hand also links back to the player)
Ideally I'd like to use something like B4XSerializator to save the objects to a file (via bytes, I assume). I know there are other possibilities too, like SQLite (although I'd like to avoid SQL if I can - I just need load/save, not queries).
However, I don't know how B4XSerializator would handle objects that link to other objects, or circular references like I described above.
Any tips greatly appreciated. Thanks!