June 23, 2008 Re: Best way to save/load an object to file? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Christian Kamm | Christian Kamm wrote:
> Bill Baxter Wrote:
>> I couldn't find the serializer in arclib. What file is it in?
>
> Maybe Clay or I removed it. It can always be found here:
> http://www.dsource.org/projects/serialization
>
> It is discontinued though.
>
> Christian
>
I see. From a quick look at the test file, I think Aarti's code is a bit further along in development than that was.
--bb
|
June 23, 2008 Re: Best way to save/load an object to file? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Saaa | Saaa pisze:
> Looks interesting, thanks.
> I need to check the code a bit more, but the creating-JSON-archive-part really strikes my fancy :)
> Phobos only wouldn't be a problem for me.
> And as I read it, the boost license lets me use the code in compiled form without having to put the license in text form. Another plus!
>
>> You may try doost serializer:
>> http://dsource.org/projects/doost/
>>
>> 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:
>> http://dsource.org/projects/doost/browser/trunk/examples/util/serializer/FunctionTest.d
>> http://dsource.org/projects/doost/browser/trunk/examples/util/serializer/FunctionTest1.d
>>
>> 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.
>>
>> BR
>> Marcin Kuszczak
>> (aarti_pl)
>>
Do not hesitate to put comments on forum regarding API/problems/suggestions.
Hope that this library will be useful for you.
BR
Marcin Kuszczak
aarti_pl
|
June 23, 2008 Re: Best way to save/load an object to file? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bill Baxter | Bill Baxter pisze:
> As usual with doost, though, it could use a little documentation. And more comments in the code. The few comments there are in Polish, which isn't much use to me.
>
> --bb
Yes documentation is unfortunately not strongest point of Doost :-(
I will try to improve this situation in future, but it takes a lot of time, especially for me as I am not native English speaker. And sadly time is not from elastic rubber :-]
Another think which stopped a bit development was uncertainty about current API design (especially everything connected with 'storage' concept). Current design works well, but I would be happy to get some feedback from real users.
BR
Marcin Kuszczak
(aarti_pl)
|
June 27, 2008 Re: Best way to save/load an object to file? | ||||
---|---|---|---|---|
| ||||
Posted in reply to Saaa | Saaa wrote: > 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. > > In addition to doost.util.serializer, which has been mentioned, h3r3tic has pointed out to me that team0xf has a library called xpose which does serialization to and from a binary format. Can be found here: http://team0xf.com:8080/xf/file/34c9c0ffde3a/xpose/Serialization.d Entire source included in xf, which you can get using hg: hg clone http://team0xf.com:8080/xf --bb |
Copyright © 1999-2021 by the D Language Foundation