std.serialization: pre-voting review / discussion
ilya-stromberg
ilya-stromberg-2009 at yandex.ru
Sun Sep 1 01:33:50 PDT 2013
On Thursday, 22 August 2013 at 19:53:53 UTC, Jacob Carlborg wrote:
> On 2013-08-22 21:30, ilya-stromberg wrote:
>
>> Great! What about more difficult cases? For example, we have:
>>
>> class Foo
>> {
>> int a;
>> int b;
>> }
>>
>> After changes we have new class:
>>
>> class Foo
>> {
>> long b;
>> }
>>
>> Can std.serialization load data to new class from old file? It
>> should
>> ignore "a" and convert "b" from int to long.
>
> No it can't. It will throw an exception because it cannot find
> a "long" element:
>
> Could not find an element "long" with the attribute "key" with
> the value "b"
Jacob, can you use clearer error messages and provide more
information for it?
You can type full class/sruct name (via
std.traits.fullyQualifiedName) and field name and type:
information can not be found in the archive
Please, put attention on it.
More information about the Digitalmars-d
mailing list