Table of Contents

Class SerializationExtensions

Namespace
Tudormobile.IronLedgerLib
Assembly
Tudormobile.IronLedgerLib.dll

Extension methods for serialization of IronLedger types.

public static class SerializationExtensions
Inheritance
SerializationExtensions
Inherited Members

Methods

DeserializeAssetId(string, IIronLedgerSerializer?)

Deserializes a string to an AssetId using the specified serializer.

public static AssetId? DeserializeAssetId(this string data, IIronLedgerSerializer? serializer = null)

Parameters

data string

The string representation to deserialize.

serializer IIronLedgerSerializer

The serializer to use. If null, uses the default JSON serializer.

Returns

AssetId

The deserialized asset ID, or null if deserialization fails.

DeserializeComponentData(string, IIronLedgerSerializer?)

Deserializes a string to a ComponentData using the specified serializer.

public static ComponentData? DeserializeComponentData(this string data, IIronLedgerSerializer? serializer = null)

Parameters

data string

The string representation to deserialize.

serializer IIronLedgerSerializer

The serializer to use. If null, uses the default JSON serializer.

Returns

ComponentData

The deserialized component data, or null if deserialization fails.

DeserializeSystemComponentData(string, IIronLedgerSerializer?)

Deserializes a string to a SystemComponentData using the specified serializer.

public static SystemComponentData? DeserializeSystemComponentData(this string data, IIronLedgerSerializer? serializer = null)

Parameters

data string

The string representation to deserialize.

serializer IIronLedgerSerializer

The serializer to use. If null, uses the default JSON serializer.

Returns

SystemComponentData

The deserialized system component data, or null if deserialization fails.

Serialize(AssetId, IIronLedgerSerializer?)

Serializes an AssetId to a string using the specified serializer.

public static string Serialize(this AssetId assetId, IIronLedgerSerializer? serializer = null)

Parameters

assetId AssetId

The asset ID to serialize.

serializer IIronLedgerSerializer

The serializer to use. If null, uses the default JSON serializer.

Returns

string

A string representation of the asset ID.

Serialize(ComponentData, IIronLedgerSerializer?)

Serializes a ComponentData to a string using the specified serializer.

public static string Serialize(this ComponentData componentData, IIronLedgerSerializer? serializer = null)

Parameters

componentData ComponentData

The component data to serialize.

serializer IIronLedgerSerializer

The serializer to use. If null, uses the default JSON serializer.

Returns

string

A string representation of the component data.

Serialize(SystemComponentData, IIronLedgerSerializer?)

Serializes a SystemComponentData to a string using the specified serializer.

public static string Serialize(this SystemComponentData systemComponentData, IIronLedgerSerializer? serializer = null)

Parameters

systemComponentData SystemComponentData

The system component data to serialize.

serializer IIronLedgerSerializer

The serializer to use. If null, uses the default JSON serializer.

Returns

string

A string representation of the system component data.