Search
CompositeNode.SaveToJson Method
See Also
 





Saves the node as a JSON object.

Namespace: MindFusion.Diagramming
Assembly: MindFusion.Diagramming

 Syntax

C#  Copy Code

protected override void SaveToJson (
    JsonObject obj,
    JsonPersistContext context
)

Visual Basic  Copy Code

Protected Overrides Sub SaveToJson( _
    obj As JsonObject, _
    context As JsonPersistContext _
)

 Parameters

obj
A JsonObject instance to contain the serialized data.
context
A JsonPersistContext object providing contextual information about the serialization process and helper serialization methods.

 Remarks

By default, all components of a CompositeNode are saved in the JSON document along with their associated data. This will lead to wasted space if the instances of a derived class are built upon the same hierarchy of components and expose only a few properties corresponding to component attributes. The recommended approach of serializing such classes is to override SerializeComponents and return false to stop the built-in serialization of components, and save / load the node properties from SaveToJson / LoadFromJson overrides.

 See Also