rejectedsoftware/vibe.d — pull request #336 by patefacio (2013-10-09 19:54:39+00:00)
Title: If deserializeJson is deserializing a struct of type T and the dsrc json...

... value is null return T.init. The benefit is null for the value of an object will not result in an exception but rather a valid instance. For serialization/deserialization all in vibe this won't happen. But if client side is another language (e.g. Dart where reference types are the norm and null values are the default) it will.

For arrays, unqualify the type to ease deserialization, but return the original qualified type. This allows deserialization of types with `immutable(T)[]`. Unfortunately it requires a cast - but it is safe. I tried to see about making deserialization pure to avoid the cast but that was too big of a change.