Best way to save/load an object to file?

aarti_pl aarti at
Sun Jun 22 15:26:51 PDT 2008

Saaa pisze:
> As the subject says  : )
> I could make my own personal loading saving functions of all the specific 
> variables in the objects, but I'd love there to be an easier way than that.

You may try doost serializer:

You can serialize to file (generally: different kinds of storages) or to 
string. There are 2 kinds of archives: simple text archive and JSON archive.

See below for use cases:

Simplest use case for storing in file you can find in FunctionTest1.d - 
3rd unit test from top.

Currently Phobos only, but should be rather easy to adapt for Tango.

Marcin Kuszczak

More information about the Digitalmars-d-learn mailing list