Am 21.11.2013 02:58, schrieb Manu Evans:

So I've had a few practical problems with Json.
The one that's got me right now is that I can't see any way to mark members as @optional, or @noserialise, which means transient data ends up in files.

It's @optional and @ignore in vibe.data.serialization

I've reached a show-stopper with it now though, where if I add a member to my struct, and then try and read my existing serialised data back into it, it complains that the new field is missing in the json and throws, so it destroys all my data any time I update a struct.
New fields that I add (not in the existing json data) should be able to take on default values.

-> @optional + use a field initializer

Also it seems reasonable that omitting fields from the json is a reasonable request that the field should be set to default, which might help reduce data volume with unnecessary json fields set to default values.

Should I be using another serialisation library?

Of course not! ;)

But seriously, Orange/std.serialization has some possibly interesting
features regarding data references. However, it doesn't support JSON
and, AFAIK, is not allocation-free (like the range based JSON
serialization in vibe.data.json), which may be an issue.