Serializer.deserialize

Deserializes the value with the given associated key.

This method should only be called when performing custom an deserializing a value that is part of an class or struct. If this method is called before that actual deserialization process has begun an SerializationException will be thrown. Use this method if a key was specified during the serialization process.

  1. T deserialize(Data data, string key)
  2. T deserialize(string key)
    class Serializer
    T
    deserialize
    (
    T
    )
    (
    string key
    )
  3. T deserialize()

Parameters

key string

the key associate with the value that was used during serialization.

Return Value

Type: T

the deserialized value. A different runtime type can be returned if the given type is a base class.

Throws

SerializationException if this method is called before the actual deserialization process has begun.

SerializationException if an error occurs

Examples

class Foo
{
    int a;

    void fromData (Serializer serializer, Serializer.Data key)
    {
        a = serializer!(int)("a");
    }
}

Meta