StructSerializer.deserialize

Loads/deserializes the content of s and its array members, using the given deserializer object. The deserializer object needs the following methods:

void open ( ref Char[] input, cstring name );

void close ( );

void deserialize ( T ) ( ref T output, cstring name );

void deserializeStruct ( ref T output, Char[] name, void delegate ( ) deserialize_struct );

void deserializeArray ( T ) ( ref T[] output, Char[] name );

void deserializeStaticArray ( T ) ( T[] output, Char[] name );

void deserializeStructArray ( T ) ( ref T[] output, Char[] name, void delegate ( ref T ) deserialize_element );

Unfortunately, as some of these methods are templates, it's not possible to make an interface for it. But the compiler will let you know whether a given deserializer object is suitable or not

See ocean.io.serialize.JsonStructDeserializer for an example.

struct StructSerializer(bool AllowUnions = false)
static
void
deserialize
(
S
Deserializer
D
)
(
S* s
,
Deserializer deserializer
,
D[] data
)

Parameters

s S*

struct instance (pointer)

deserializer Deserializer

object to do the deserialization

data D[]

input buffer to read serialized data from

Meta