On Saturday, 25 April 2015 at 09:56:25 UTC, tired_eyes wrote:
I think this is ugly and clunky approach, what is the beautiful one?

What you clearly need is a serializer:

look at these:

http://wiki.dlang.org/Libraries_and_Frameworks#Serialization

and also:

https://github.com/search?utf8=✓&q=serializer+language%3AD&type=Repositories&ref=searchresults

some of them might have an API to save load an object or a struct in a single call.

Reply via email to