FieldedText TypeScript Library
    Preparing search index...

    API for serializing and deserializing FtMeta objects into/from files. Provides a unified interface for both XML and JSON formats.

    Hierarchy

    • FtMetaSerialization
      • FtNodeMetaSerialization
    Index
    • Deserialize an FtMeta object from a string.

      Parameters

      • content: string

        The serialized meta content (XML or JSON)

      • Optionalwarnings: string[]

        Optional array to collect warnings during deserialization

      • Optionalformat: FtMetaSerializationFormat

        The format of the content (default: auto-detect)

      Returns FtMeta

      The deserialized FtMeta object

    • Deserialize an FtMeta object from a file path (Node.js only). The format is detected from the file extension when format is not provided.

      Parameters

      • filePath: PathOrFileDescriptor

        The path or file descriptor of the meta file.

      • Optionalwarnings: string[]

        An optional array to receive deserialization warnings.

      • encoding: BufferEncoding = 'utf-8'

        The encoding of the file. Defaults to utf-8.

      • Optionalformat: FtMetaSerializationFormat

        The format of the file. Defaults to the format detected from the file extension.

      Returns FtMeta

      The deserialized FtMeta object

    • Serialize an FtMeta object to a string.

      Parameters

      • meta: FtMeta

        The FtMeta object to serialize

      • Optionaloptions: FtMetaSerializerOptions
      • Optionalformat: FtMetaSerializationFormat

        The output format (default: XML)

      Returns string

      The serialized string

    • Serialize an FtMeta object to a file (Node.js only). The format is detected from the file extension when format is not provided.

      Parameters

      • meta: FtMeta

        The FtMeta object to serialize.

      • filePath: PathOrFileDescriptor

        The output path or file descriptor.

      • Optionaloptions: FtMetaSerializerOptions

        Optional serialization options.

      • encoding: BufferEncoding = 'utf-8'

        The encoding of the file. Defaults to utf-8.

      • Optionalformat: FtMetaSerializationFormat

        The output format. Defaults to the format detected from the file extension.

      Returns void