DeserializerManager

Summary

Manages the deserializers used for serialized state

An instance of this class is always available as the atom.deserializers global.

Instance Methods

add(deserializers)

Register the given class(es) as deserializers.

Parameters
Argument Description
deserializers

One or more deserializers to register. A deserializer can be any object with a .name property and a .deserialize() method. A common approach is to register a constructor as the deserializer for its instances by adding a .deserialize() class method.

deserialize(stateparams)

Deserialize the state and params.

Parameters
Argument Description
state

The state Object to deserialize.

params

The params Object to pass as the second arguments to the deserialize method of the deserializer.