Range interface for std.serialization
Jacob Carlborg
doob at me.com
Mon Aug 26 00:07:40 PDT 2013
On 2013-08-25 22:50, Dmitry Olshansky wrote:
> Adapting the code by Jacob (Alternative AO2)
>
> auto archiver = new XmlArchive!(char)(outputRange);
> auto serializer = new Serializer(archiver);
> serializer.put(new Object);
> serializer.put([1, 2, 3, 4]); //mix and match stuff as you see fit
>
> And even
> copy(iota(1, 10), serializer);
>
> Would all work just fine.
I'm still worried about how to get out deserialized objects, especially
if they are serialized as a range.
--
/Jacob Carlborg
More information about the Digitalmars-d
mailing list