StringCodecs

Default StringCodec factories for the scalar types used throughout Tapik's HTTP DSL.

This object centralizes the library's built-in string parsing rules so headers, parameters, and bodies all use the same conversions and error reporting.

Functions

Link copied to clipboard
open override fun bigDecimal(name: String): StringCodec<BigDecimal>

Returns the default representation of a BigDecimal value identified by name.

Link copied to clipboard
open override fun bigInteger(name: String): StringCodec<BigInteger>

Returns the default representation of a BigInteger value identified by name.

Link copied to clipboard
open override fun boolean(name: String): StringCodec<Boolean>

Returns the default representation of a Boolean value identified by name.

Link copied to clipboard
open override fun byte(name: String): StringCodec<Byte>

Returns the default representation of a Byte value identified by name.

Link copied to clipboard
open override fun double(name: String): StringCodec<Double>

Returns the default representation of a Double value identified by name.

Link copied to clipboard
open override fun float(name: String): StringCodec<Float>

Returns the default representation of a Float value identified by name.

Link copied to clipboard
open override fun int(name: String): StringCodec<Int>

Returns the default representation of an Int value identified by name.

Link copied to clipboard
open override fun long(name: String): StringCodec<Long>

Returns the default representation of a Long value identified by name.

Link copied to clipboard
inline fun <V, T : ValueClass<V>> ofValueClass(fallbackName: String = "value", crossinline toString: (V) -> String = { it.toString() }): StringCodec<T>

Creates a StringCodec for a ValueClass wrapper by delegating to Tapik's default string codec and constructing the wrapper through its primary constructor.

Link copied to clipboard
open override fun short(name: String): StringCodec<Short>

Returns the default representation of a Short value identified by name.

Link copied to clipboard
open override fun string(name: String): StringCodec<String>

Returns the default representation of a String value identified by name.

Link copied to clipboard
open override fun unit(name: String): StringCodec<Unit>

Returns the default representation of a Unit value identified by name.

Link copied to clipboard
open override fun uuid(name: String): StringCodec<UUID>

Returns the default representation of a UUID value identified by name.