Range interface for std.serialization

Jacob Carlborg doob at me.com
Thu Oct 10 00:45:50 PDT 2013


On 2013-08-27 22:12, Dmitry Olshansky wrote:

> Feel free to nag me on the NG and personally for any deficiency you come
> across on the way there ;)

I'm bumping this again with a new question. I'm thinking about how to 
output the data to output range. If the output range is of type ubyte[] 
how should I output serialized data looking like this:

<object runtimeType="main.Foo" type="main.Foo" key="0" id="0">
     <int key="a" id="1">3</int>
</object>

Should I output this in one chunk or in parts like this:

<object runtimeType="main.Foo" type="main.Foo" key="0" id="0">

Then

<int key="a" id="1">3</int>

Then

</object>

If the first case is chosen I guess this data:

<object runtimeType="main.Foo" type="main.Foo" key="0" id="0">
     <int key="a" id="1">3</int>
</object>

<object runtimeType="main.Foo" type="main.Foo" key="1" id="2">
     <int key="a" id="3">3</int>
</object>

Would be outputted in two chunks.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list