Header menu logo Migrondi

MiSerializer Type

Provides static methods for encoding and decoding Migrondi types.

Static members

Static member Description

MiSerializer.Decode(content, ?migrationName)

Full Usage: MiSerializer.Decode(content, ?migrationName)

Parameters:
    content : string - The content to decode.
    ?migrationName : string - Optional migration name, required for v0 format migrations.

Returns: Migration A Migration object.

Decodes Migrondi text format to a Migration.

content : string

The content to decode.

?migrationName : string

Optional migration name, required for v0 format migrations.

Returns: Migration

A Migration object.

DeserializationFailed Thrown when the content cannot be decoded.

MiSerializer.DecodeConfig(content)

Full Usage: MiSerializer.DecodeConfig(content)

Parameters:
    content : string - The JSON content to decode.

Returns: MigrondiConfig A MigrondiConfig object.

Decodes JSON to a MigrondiConfig.

content : string

The JSON content to decode.

Returns: MigrondiConfig

A MigrondiConfig object.

DeserializationFailed Thrown when the content cannot be decoded.

MiSerializer.DecodeRecord(content)

Full Usage: MiSerializer.DecodeRecord(content)

Parameters:
    content : string - The JSON content to decode.

Returns: MigrationRecord A MigrationRecord object.

Decodes JSON to a MigrationRecord.

content : string

The JSON content to decode.

Returns: MigrationRecord

A MigrationRecord object.

DeserializationFailed Thrown when the content cannot be decoded.

MiSerializer.Encode(record)

Full Usage: MiSerializer.Encode(record)

Parameters:
Returns: string A JSON string containing the encoded migration record.

Encodes a MigrationRecord to JSON.

record : MigrationRecord

The migration record to encode.

Returns: string

A JSON string containing the encoded migration record.

MiSerializer.Encode(config)

Full Usage: MiSerializer.Encode(config)

Parameters:
Returns: string A JSON string containing the encoded configuration.

Encodes a MigrondiConfig to JSON.

config : MigrondiConfig

The configuration to encode.

Returns: string

A JSON string containing the encoded configuration.

MiSerializer.Encode(migration)

Full Usage: MiSerializer.Encode(migration)

Parameters:
    migration : Migration - The migration to encode.

Returns: string A string containing the encoded migration.

Encodes a Migration to the Migrondi text format.

migration : Migration

The migration to encode.

Returns: string

A string containing the encoded migration.

Type something to start searching.