Serialization
Preview version
The jsMind V2 programming API is currently a preview. The API will change in later updates. Please check this documentation anytime for the interface that is current.
Read and write a mind map through jsMind.Serializer.create(format). JsMind.serialize() is a JSON convenience on an open map.
This page is generated from the published typings dist/jsmind.d.ts with TypeDoc.
JmMindSerializerFactory
Class
Creates serializers for the formats the library can read and write.
Constructor
ts
constructor()create
ts
static create(format: string): JmMindSerializerCreates a serializer for the given format.
Returns: A serializer for that format.
Throws
JsMindErrorIf the format is not supported.
Parameters
| Name | Type | Description |
|---|---|---|
format | string | 'json' or 'freemind'. |
JmMindSerializer
Interface
Base interface for all mind map serializers.
Properties
| Name | Type | Description |
|---|---|---|
deserialize | unknown | Deserializes data to a mind map. |
getFormatName | unknown | Gets the format name this serializer supports. |
serialize | unknown | Serializes a mind map to the specific format. |
validate | unknown | Validates if the data can be deserialized by this serializer. |