Skip to main content

Home > blockly > Events > fromJson

Events.fromJson() function

Decode the JSON into an event.

Signature:

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

Parameters

ParameterTypeDescription
jsonanyJSON representation.
workspaceWorkspaceTarget workspace for event.

Returns:

Abstract

The event represented by the JSON.

Exceptions

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