std.json cannot read an array floats back from file
Yuri via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jul 3 09:00:38 PDT 2017
On Monday, 3 July 2017 at 14:04:47 UTC, ketmar wrote:
> Yuri wrote:
>
>> On Sunday, 2 July 2017 at 21:15:41 UTC, ketmar wrote:
>>> [...]
>>
>> I share your sentiment in relation to std.json, ketmar.
>>
>> On a side note, what would be a better way to
>> serialize/deserialize objects in D if std.json does not cut
>> it? It does not have to be JSON serialization although would
>> be preferred.
>
> it depends of the types of your objects. simple json-like
> (de)serializer for objects with fixed layout can be done in
> very small amount of code[0]. that's what i am using (and it
> can *read* json into structs too, i'm actually using it to
> parse some jsons -- idgames API replies, for example).
>
> [0] http://repo.or.cz/iv.d.git/blob_plain/HEAD:/txtser.d
Thanks, ketmar, I'll have a look into the code, the objects I am
dealing with are not particularly complex, that might work well
enough.
More information about the Digitalmars-d-learn
mailing list