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
datastringThe string representation to deserialize.
serializerIIronLedgerSerializerThe 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
datastringThe string representation to deserialize.
serializerIIronLedgerSerializerThe 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
datastringThe string representation to deserialize.
serializerIIronLedgerSerializerThe 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
assetIdAssetIdThe asset ID to serialize.
serializerIIronLedgerSerializerThe 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
componentDataComponentDataThe component data to serialize.
serializerIIronLedgerSerializerThe 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
systemComponentDataSystemComponentDataThe system component data to serialize.
serializerIIronLedgerSerializerThe serializer to use. If null, uses the default JSON serializer.
Returns
- string
A string representation of the system component data.