Interface IJsonExportable
Interface for blocks that can export their configuration to JsonModel.
Namespace: MOSAIC.Components.Interfaces
Assembly: MOSAIC.dll
Syntax
public interface IJsonExportable
Remarks
Implement this interface to enable saving block configurations to JSON files. The exported JsonModel should contain all parameters needed to recreate the block in its current state.
Methods
ToJsonModel()
Exports the current block configuration to a JsonModel.
Declaration
JsonModel ToJsonModel()
Returns
| Type | Description |
|---|---|
| JsonModel | A JsonModel representing the current state of the block. |
Remarks
The returned JsonModel should include:
- Type - the block type identifier
- Name - the block's name
- Params - all configurable parameters
- DesiredRate - if applicable
- Path - if the block uses external files
Note: Inputs are typically preserved from the original model during serialization, as they represent the graph structure rather than block state.