Fastest way to save and restore Array of objects?

I have a “Login”-Class with string properties which store the details of a successful login*.

Then I save each unique login in an array of Login instances.

Now I would like to save the whole array of Login objects as a XML or JSON String in iOS User Preferences.

So far I have failed to make use of the Einhugur serialization framework on iOS. At the moment this does not work for me.

Which is the fastest way that you know, to serialize an array of class instances to a String?

  • EDIT: I can connect the app to different databases and I would like to display a history to the user, so that he can easily connect again to one if his previously established connections

It seems to me, that all of the serialization work that has been provided by the community here in the past, is deprecated and not working with latest Xojo and framework.

So I wrote my own using GenerateJSON and ParseJSON and then save the JSON using NSUserDefaultsMBS.

This works for me.