Skip to main content

Home > blockly > serialization > blocks > BlockSerializer

serialization.blocks.BlockSerializer class

Serializer for saving and loading block state.

Signature:

export declare class BlockSerializer implements ISerializer 

Implements: ISerializer

Constructors

ConstructorModifiersDescription
(constructor)()Constructs a new instance of the BlockSerializer class

Properties

PropertyModifiersTypeDescription
prioritynumber

Methods

MethodModifiersDescription
clear(workspace)Disposes of any blocks that exist on the workspace.
load(state, workspace)Deserializes the blocks defined by the given state into the given workspace.
save(workspace)Serializes the blocks of the given workspace.