Skip to main content

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

Constructor

Modifiers

Description

(constructor)()

Constructs a new instance of the BlockSerializer class

Properties

Property

Modifiers

Type

Description

priority

number

Methods

Method

Modifiers

Description

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.