blockly > Events > fromJson

Events.fromJson() function

Decode the JSON into an event.

Signature:

export declare function fromJson(json: any, workspace: Workspace): Abstract;

Parameters

Parameter Type Description
json any JSON representation.
workspace Workspace Target workspace for event.

Returns:

Abstract

The event represented by the JSON.

Exceptions

{Error} if an event type is not found in the registry.