blockly > Events > VarCreate > toJson
Events.VarCreate.toJson() method
Encode the event as JSON.
Signature:
toJson(): VarCreateJson;
Returns:
VarCreateJson
JSON representation.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `toJson()` method encodes a Blockly Events.VarCreate event as a JSON object."],["It returns a VarCreateJson object representing the JSON format of the event."],["This method is used for serializing the VarCreate event, allowing it to be stored and later reconstructed."]]],["The `Events.VarCreate.toJson()` method encodes a variable creation event into a JSON representation. It takes no parameters and returns a `VarCreateJson` object, which is the JSON representation of the event. This method essentially serializes the variable creation event data into a structured JSON format.\n"]]