Stay organized with collections
Save and categorize content based on your preferences.
blockly > serialization > ISerializer
serialization.ISerializer interface
Serializes and deserializes a plugin or system.
Signature:
export interface ISerializer
Properties
Property |
Modifiers |
Type |
Description |
priority |
|
number |
A priority value used to determine the order of deserializing state. More positive priorities are deserialized before less positive priorities. Eg if you have priorities (0, -10, 10, 100) the order of deserialiation will be (100, 10, 0, -10). If two serializers have the same priority, they are deserialized in an arbitrary order relative to each other. |
Methods
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."],[[["The `ISerializer` interface defines methods for saving, loading, and clearing the state of a plugin or system within Blockly."],["Serializers have a priority value that determines the order in which their state is deserialized, with higher priorities being deserialized first."],["The `clear` method resets the plugin or system's state, while `load` and `save` handle loading from and saving to a serialized state, respectively."]]],["The `ISerializer` interface handles the serialization and deserialization of a plugin or system's state. It defines three core methods: `save`, which saves the state; `load`, which loads the state; and `clear`, which resets the state. It also includes a `priority` property, a numerical value determining the order in which states are deserialized, with higher positive values being processed first. Equal priorities result in arbitrary order.\n"]]