Stay organized with collections
Save and categorize content based on your preferences.
blockly > serialization > procedures > saveProcedure
serialization.procedures.saveProcedure() function
Serializes the given IProcedureModel to JSON.
Signature:
export declare function saveProcedure(proc: IProcedureModel): State;
Parameters
Returns:
State
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-18 UTC."],[[["\u003cp\u003eThe \u003ccode\u003esaveProcedure\u003c/code\u003e function within the \u003ccode\u003eserialization.procedures\u003c/code\u003e namespace converts a given procedure model (\u003ccode\u003eIProcedureModel\u003c/code\u003e) into a JSON representation for storage or transfer.\u003c/p\u003e\n"],["\u003cp\u003eThis function accepts an \u003ccode\u003eIProcedureModel\u003c/code\u003e object as input, representing the procedure to be serialized.\u003c/p\u003e\n"],["\u003cp\u003eUpon serialization, the function returns a \u003ccode\u003eState\u003c/code\u003e object containing the JSON data of the procedure.\u003c/p\u003e\n"]]],["The `saveProcedure` function serializes an `IProcedureModel` to JSON format. It takes one parameter, `proc`, which is of type `IProcedureModel`. The function's primary action is to convert the procedure model into a serializable `State` object. This allows for the persistence or transfer of procedure data in a JSON format. The function's signature is `export declare function saveProcedure(proc: IProcedureModel): State;`.\n"],null,["[blockly](./blockly.md) \\\u003e [serialization](./blockly.serialization_namespace.md) \\\u003e [procedures](./blockly.serialization_namespace.procedures_namespace.md) \\\u003e [saveProcedure](./blockly.serialization_namespace.procedures_namespace.saveprocedure_1_function.md)\n\nserialization.procedures.saveProcedure() function\n-------------------------------------------------\n\nSerializes the given IProcedureModel to JSON.\n\n**Signature:** \n\n export declare function saveProcedure(proc: IProcedureModel): State;\n\nParameters\n----------\n\n| Parameter | Type | Description |\n|-----------|--------------------------------------------------------------------------------|-------------|\n| proc | [IProcedureModel](./blockly.procedures_namespace.iproceduremodel_interface.md) | |\n\n**Returns:**\n\nState"]]