DeserializerManager

Description

Manages the deserializers used for serialized state

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

Examples
class MyPackageView extends View
  atom.deserializers.add(this)

  @deserialize: (state) ->
    new MyPackageView(state)

  constructor: (@state) ->

  serialize: ->
    @state

API documentation

All methods

::add(deserializers)

Register the given class(es) as deserializers.

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(state, params)

Deserialize the state and params.

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.