BigIntegerSerializer

object BigIntegerSerializer : KSerializer<BigInteger>

Serializer for ionspin BigInteger that converts to/from String. This is needed for kotlinx.serialization support.

For deserialization, accepts both numeric and string JSON values:

  • "chainId": 1 (numeric) - parsed as integer

  • "chainId": "12345678901234567890" (string) - parsed as string for very large numbers

For serialization, always outputs as string to ensure precision.

Properties

Link copied to clipboard
open override val descriptor: SerialDescriptor

Functions

Link copied to clipboard
open override fun deserialize(decoder: Decoder): BigInteger
Link copied to clipboard
open override fun serialize(encoder: Encoder, value: BigInteger)