TODO: Give compile-time error message when trying to serialize void* but not void[]
TODO: Allocator supoprt
TODO: Disable (de)serialization of nested types via !__traits(isNested, T)
TODO: Support serialization of cycles and remove Code.failureCycle and sc.
TODO: Use direct field setting for T only when __traits(isPOD, T) is true
otherwise use __traits(getOverloads, T, "__ctor").
Try to use this to generalize (de)serialization of std.json.JSONValue
to a type-agnostic logic inside inside generic main generic serializeRaw
and deserializeRaw.
TODO: Support bit-blitting of unions of only non-pointer fields.
TODO: Only disable union's that contain any pointers.
Detect using __traits, std.traits or gc_traits.d.
TODO: Avoid call to new when deserializing arrays of immutable elements
(and perhaps classes) when Sink element type E is immutable.
TODO: Exercise JSONValue (de)serialization with nxt.sampling.
TODO: Optimize (de)serialization when __traits(hasIndirections) is avaiable and
__traits(hasIndirections, T) is false and enablesSlicing is set.
Serialization.
Test: dmd -version=show -preview=dip1000 -preview=in -vcolumns -d -I.. -i -debug -g -checkaction=context -allinst -unittest -main -run serialization.d Test: ldmd2 -d -fsanitize=address -I.. -i -debug -g -checkaction=context -allinst -unittest -main -run serialization.d Debug: ldmd2 -d -fsanitize=address -I.. -i -debug -g -checkaction=context -allinst -unittest -main serialization.d && lldb serialization
TODO: Give compile-time error message when trying to serialize void* but not void[] TODO: Allocator supoprt TODO: Disable (de)serialization of nested types via !__traits(isNested, T) TODO: Support serialization of cycles and remove Code.failureCycle and sc. TODO: Use direct field setting for T only when __traits(isPOD, T) is true otherwise use __traits(getOverloads, T, "__ctor"). Try to use this to generalize (de)serialization of std.json.JSONValue to a type-agnostic logic inside inside generic main generic serializeRaw and deserializeRaw. TODO: Support bit-blitting of unions of only non-pointer fields. TODO: Only disable union's that contain any pointers. Detect using __traits, std.traits or gc_traits.d. TODO: Avoid call to new when deserializing arrays of immutable elements (and perhaps classes) when Sink element type E is immutable. TODO: Exercise JSONValue (de)serialization with nxt.sampling. TODO: Optimize (de)serialization when __traits(hasIndirections) is avaiable and __traits(hasIndirections, T) is false and enablesSlicing is set.