Package-level declarations

Types

Link copied to clipboard

The basic implementation of TomlWriter, handling all the essential logic except writeString and (optional) writeChar.

Link copied to clipboard
expect class NativeLocalDate

A date without a time-zone in the ISO-8601 calendar system.

actual typealias NativeLocalDate = LocalDate
actual typealias NativeLocalDate = LocalDate
Link copied to clipboard
expect class NativeLocalDateTime

A date-time without a time-zone in the ISO-8601 calendar system.

actual typealias NativeLocalDateTime = LocalDateTime
Link copied to clipboard
expect class NativeLocalTime

A time without a time-zone in the ISO-8601 calendar system.

actual typealias NativeLocalTime = LocalTime
actual typealias NativeLocalTime = LocalTime
Link copied to clipboard

A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system.

actual typealias NativeOffsetDateTime = Instant
Link copied to clipboard
sealed class Toml : StringFormat

The main entry point to use TOML.

Link copied to clipboard
@Serializable(with = TomlArraySerializer::class)
class TomlArray : TomlElement, List<TomlElement>

Represents array in TOML, whose values are TomlElement.

Link copied to clipboard
class TomlArrayBuilder(initialCapacity: Int = 8)

The builder for buildTomlArray { ... } factory function.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TomlBlockArray(val itemsPerLine: Int = 1)

Modifies the encoding process of corresponding array-like property, either to force array of table to be encoded as block array, or to change how many items should be encoded per line (this will override the default config).

Link copied to clipboard
@InheritableSerialInfo
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class TomlClassDiscriminator(val discriminator: String)

Changes the key of the class discriminator of a specific type hierarchy.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TomlComment(val text: String)

Adds comments to corresponding property.

Link copied to clipboard

The builder for Toml { ... } factory function.

Link copied to clipboard
abstract class TomlContentPolymorphicSerializer<T : Any>(baseClass: KClass<T>, serialName: String = "TomlContentPolymorphicSerializer<") : KSerializer<T>

Base class for encoding and decoding subclasses of baseClass without a classDiscriminator.

Link copied to clipboard
interface TomlDecoder : Decoder

A special Decoder used internally by the decoding process, providing an extra decodeTomlElement to decode TomlElement from current position.

Link copied to clipboard
@Serializable(with = TomlElementSerializer::class)
sealed class TomlElement

Represents anything in TOML, including and only including TomlNull, TomlLiteral, TomlArray, TomlTable.

Link copied to clipboard
interface TomlEncoder : Encoder

A special Encoder used internally by the encoding process, providing an extra encodeTomlElement to encode TomlElement to current position.

Link copied to clipboard
value class TomlIndentation(val representation: String)

Defines the representation of an indentation.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TomlInline

Forces the annotated array-like or table-like property to be a one-liner.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TomlInteger(val base: TomlInteger.Base = Dec, val group: Int = 0)

Changes the representation of the annotated Byte, Short, Int, Long property.

Link copied to clipboard
@Serializable(with = TomlLiteralSerializer::class)
class TomlLiteral : TomlElement

Represents a literal value, which could be boolean, integer, float, string, date-time.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TomlLiteralString

Marks the annotated String property as literal when encoded.

Link copied to clipboard
typealias TomlLocalDate = @Serializable(with = LocalDateSerializer::class) NativeLocalDate

A date without a time-zone in the ISO-8601 calendar system.

For JVM, this is an alias of java.time.LocalDate. For other platforms, this is kotlinx.datetime.LocalDate.

This type has builtin support for serialization.

Link copied to clipboard
typealias TomlLocalDateTime = @Serializable(with = LocalDateTimeSerializer::class) NativeLocalDateTime

A date-time without a time-zone in the ISO-8601 calendar system.

For JVM, this is an alias of java.time.LocalDateTime. For other platforms, this is kotlinx.datetime.LocalDateTime.

This type has builtin support for serialization.

Link copied to clipboard
typealias TomlLocalTime = @Serializable(with = LocalTimeSerializer::class) NativeLocalTime

A time without a time-zone in the ISO-8601 calendar system.

For JVM, this is an alias of java.time.LocalTime. For other platforms, this is kotlinx.datetime.LocalTime.

This type has builtin support for serialization.

Link copied to clipboard
@SerialInfo
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class TomlMultilineString

Marks the annotated String property as multiline when encoded.

Link copied to clipboard
class TomlNativeReader(nativeReader: Reader) : TomlReader

A TomlReader that reads TOML string from nativeReader.

Link copied to clipboard

A TomlWriter that writes TOML string to nativeWriter.

Link copied to clipboard
@Serializable(with = TomlNullSerializer::class)
object TomlNull : TomlElement

Represents null.

Link copied to clipboard
typealias TomlOffsetDateTime = @Serializable(with = OffsetDateTimeSerializer::class) NativeOffsetDateTime

A date-time with an offset from UTC/Greenwich in the ISO-8601 calendar system.

For JVM, this is an alias of java.time.OffsetDateTime. For other platforms, this is kotlinx.datetime.Instant.

This type has builtin support for serialization.

Link copied to clipboard
interface TomlReader

A custom reader used when decoding TOML file.

Link copied to clipboard
annotation class TomlSpecific

Indicates that the corresponding type is only stable to use, but shouldn't be subclassed by any third party, otherwise it may result in unpredictable behavior.

Link copied to clipboard

A TomlWriter that writes TOML string to outputStream.

Link copied to clipboard

A TomlReader that reads TOML string.

Link copied to clipboard

A TomlWriter that writes TOML as string.

Link copied to clipboard
@Serializable(with = TomlTableSerializer::class)
class TomlTable : TomlElement, Map<String, TomlElement>

Represents table in TOML, whose keys are strings and values are TomlElements.

Link copied to clipboard
class TomlTableBuilder(initialCapacity: Int = 8)

The builder for buildTomlTable { ... } factory function.

Link copied to clipboard
interface TomlWriter

A custom writer used when encoding model class or TomlElement.

Functions

Link copied to clipboard
fun TomlArray.allAnnotated(vararg annotations: Annotation): TomlArray

Annotates all the values from this TomlArray with the same annotations.

fun TomlTable.allAnnotated(vararg annotations: Annotation): TomlTable

Annotates all the entries from this TomlTable with the same annotations.

Link copied to clipboard
fun TomlArray.annotated(vararg annotations: List<Annotation>): TomlArray

Annotates this TomlArray with annotations.

fun TomlTable.annotated(vararg annotations: Pair<*, List<Annotation>>): TomlTable

Annotates this TomlTable with annotations.

Link copied to clipboard
fun TomlArrayBuilder.array(vararg elementAnnotations: Annotation, block: TomlArrayBuilder.() -> Unit)
fun TomlArrayBuilder.array(elementAnnotations: List<Annotation> = emptyList(), block: TomlArrayBuilder.() -> Unit)

Adds a TomlArray built with block to this array and annotates it with elementAnnotations.

fun TomlTableBuilder.array(key: Any?, vararg elementAnnotations: Annotation, block: TomlArrayBuilder.() -> Unit)
fun TomlTableBuilder.array(key: Any?, elementAnnotations: List<Annotation> = emptyList(), block: TomlArrayBuilder.() -> Unit)

Associates a TomlArray built with block with primitive key and annotates the array with elementAnnotations.

Link copied to clipboard
Link copied to clipboard
fun Decoder.asTomlDecoder(): TomlDecoder

More convenient means to cast this Decoder to TomlDecoder.

Link copied to clipboard
fun Encoder.asTomlEncoder(): TomlEncoder

More convenient means to cast this Encoder to TomlEncoder.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
inline fun buildTomlArray(initialCapacity: Int = 8, block: TomlArrayBuilder.() -> Unit): TomlArray

Creates a TomlArray by populating a TomlArrayBuilder with block.

Link copied to clipboard
inline fun buildTomlTable(initialCapacity: Int = 8, block: TomlTableBuilder.() -> Unit): TomlTable

Creates a TomlTable by populating a TomlTableBuilder with block.

Link copied to clipboard
inline fun <T> Toml.decodeFromNativeReader(nativeReader: Reader): T

Deserializes the content of nativeReader into a value of type T using the serializer retrieved from reified type parameter.

inline fun <T> Toml.decodeFromNativeReader(nativeReader: Reader, vararg keys: Any?): T

Parses the content of nativeReader into a TomlTable and deserializes the corresponding element fetched with keys into a value of type T using the serializer retrieved from reified type parameter.

fun <T> Toml.decodeFromNativeReader(deserializer: DeserializationStrategy<T>, nativeReader: Reader): T

Deserializes the content of nativeReader into a value of type T using deserializer.

fun <T> Toml.decodeFromNativeReader(deserializer: DeserializationStrategy<T>, nativeReader: Reader, vararg keys: Any?): T

Parses the content of nativeReader into a TomlTable and deserializes the corresponding element fetched with keys into a value of type T using deserializer.

Link copied to clipboard
inline fun <T> Toml.decodeFromReader(reader: TomlReader): T

Deserializes the content of reader into a value of type T using the serializer retrieved from reified type parameter.

inline fun <T> Toml.decodeFromReader(reader: TomlReader, vararg keys: Any?): T

Parses the content of reader into a TomlTable and deserializes the corresponding element fetched with keys into a value of type T using the serializer retrieved from reified type parameter.

Link copied to clipboard
inline fun <T> Toml.decodeFromString(string: String, vararg keys: Any?): T

Parses string into a TomlTable and deserializes the corresponding element fetched with keys into a value of type T using the serializer retrieved from reified type parameter.

Link copied to clipboard
inline fun <T> Toml.decodeFromTomlElement(element: TomlElement): T

Deserializes element into a value of type T using the serializer retrieved from reified type parameter.

Link copied to clipboard
fun TomlArrayBuilder.element(element: TomlElement, vararg elementAnnotations: Annotation)

Adds element to this array and annotates it with elementAnnotations.

fun TomlTableBuilder.element(key: Any?, element: TomlElement, vararg elementAnnotations: Annotation)

Associates element with primitive key and annotates element with elementAnnotations.

Link copied to clipboard
inline fun <T> Toml.encodeToNativeWriter(value: T, nativeWriter: Writer)

Serializes value into nativeWriter using the serializer retrieved from reified type parameter.

fun <T> Toml.encodeToNativeWriter(serializer: SerializationStrategy<T>, value: T, nativeWriter: Writer)

Serializes value into nativeWriter using serializer.

Link copied to clipboard
inline fun <T> Toml.encodeToStream(value: T, outputStream: OutputStream)

Serializes value into outputStream using the serializer retrieved from reified type parameter.

fun <T> Toml.encodeToStream(serializer: SerializationStrategy<T>, value: T, outputStream: OutputStream)

Serializes value into outputStream using serializer.

Link copied to clipboard
inline fun <T> Toml.encodeToTomlElement(value: T): TomlElement

Serializes value into TomlElement using the serializer retrieved from reified type parameter.

Link copied to clipboard
inline fun <T> Toml.encodeToWriter(value: T, writer: TomlWriter)

Serializes value into writer using the serializer retrieved from reified type parameter.

Link copied to clipboard
operator fun TomlTable.get(vararg keys: Any?): TomlElement?

Gets the element along the path constructed by keys.

Link copied to clipboard

Gets a TomlArray with index from this TomlArray.

Gets a TomlArray with key from this TomlTable.

Link copied to clipboard

Gets a TomlArray with index from this TomlArray. If the element does not exist, or it is not a TomlArray, this returns null.

Gets a TomlArray with key from this TomlTable. If the entry does not exist, or it is not a TomlArray, this returns null.

Link copied to clipboard

Gets a boolean with index from this TomlArray.

Gets a boolean with key from this TomlTable.

Link copied to clipboard

Gets a boolean with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, or it cannot be converted to a boolean, this returns null.

Gets a boolean with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, or it cannot be converted to a boolean, this returns null.

Link copied to clipboard

Gets a float (TOML float, which is Double) with index from this TomlArray.

Gets a float (TOML float, which is Double) with key from this TomlTable.

Link copied to clipboard

Gets a float (TOML float, which is Double) with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, or it cannot be converted to a float, this returns null.

Gets a float (TOML float, which is Double) with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, or it cannot be converted to a float, this returns null.

Link copied to clipboard

Gets an integer (TOML integer, which is Long) with index from this TomlArray.

Gets an integer (TOML integer, which is Long) with key from this TomlTable.

Link copied to clipboard

Gets an integer (TOML integer, which is Long) with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, or it cannot be converted to an integer, this returns null.

Gets an integer (TOML integer, which is Long) with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, or it cannot be converted to an integer, this returns null.

Link copied to clipboard

Gets a TomlLiteral with index from this TomlArray.

Gets a TomlLiteral with key from this TomlTable.

Link copied to clipboard

Gets a TomlLiteral with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, this returns null.

Gets a TomlLiteral with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, this returns null.

Link copied to clipboard
Link copied to clipboard

Gets a TomlLocalDate with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, or it cannot be converted to a TomlLocalDate, this returns null.

Gets a TomlLocalDate with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, or it cannot be converted to a TomlLocalDate, this returns null.

Link copied to clipboard

Gets a TomlLocalDateTime with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, or it cannot be converted to a TomlLocalDateTime, this returns null.

Gets a TomlLocalDateTime with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, or it cannot be converted to a TomlLocalDateTime, this returns null.

Link copied to clipboard
Link copied to clipboard

Gets a TomlLocalTime with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, or it cannot be converted to a TomlLocalTime, this returns null.

Gets a TomlLocalTime with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, or it cannot be converted to a TomlLocalTime, this returns null.

Link copied to clipboard

Gets a TomlOffsetDateTime with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, or it cannot be converted to a TomlOffsetDateTime, this returns null.

Gets a TomlOffsetDateTime with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, or it cannot be converted to a TomlOffsetDateTime, this returns null.

Link copied to clipboard

Gets a string with index from this TomlArray.

Gets a string with key from this TomlTable.

Link copied to clipboard

Gets a string with index from this TomlArray. If the element does not exist, or it is not a TomlLiteral, or it cannot be converted to a string, this returns null.

Gets a string with key from this TomlTable. If the entry does not exist, or it is not a TomlLiteral, or it cannot be converted to a string, this returns null.

Link copied to clipboard

Gets a TomlTable with index from this TomlArray.

Gets a TomlTable with key from this TomlTable.

Link copied to clipboard

Gets a TomlTable with index from this TomlArray. If the element does not exist, or it is not a TomlTable, this returns null.

Gets a TomlTable with key from this TomlTable. If the entry does not exist, or it is not a TomlTable, this returns null.

Link copied to clipboard
fun TomlArrayBuilder.literal(boolean: Boolean, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(boolean: Boolean, elementAnnotations: List<Annotation> = emptyList())

Adds boolean to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(float: Double, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(float: Double, elementAnnotations: List<Annotation> = emptyList())

Adds float to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(integer: Long, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(integer: Long, elementAnnotations: List<Annotation> = emptyList())

Adds integer to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(string: String, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(string: String, elementAnnotations: List<Annotation> = emptyList())

Adds string to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(localDate: NativeLocalDate, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(localDate: NativeLocalDate, elementAnnotations: List<Annotation> = emptyList())

Adds localDate to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(localDateTime: NativeLocalDateTime, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(localDateTime: NativeLocalDateTime, elementAnnotations: List<Annotation> = emptyList())

Adds localDateTime to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(localTime: NativeLocalTime, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(localTime: NativeLocalTime, elementAnnotations: List<Annotation> = emptyList())

Adds localTime to this array and annotates it with elementAnnotations.

fun TomlArrayBuilder.literal(offsetDateTime: NativeOffsetDateTime, vararg elementAnnotations: Annotation)
fun TomlArrayBuilder.literal(offsetDateTime: NativeOffsetDateTime, elementAnnotations: List<Annotation> = emptyList())

Adds offsetDateTime to this array and annotates it with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, boolean: Boolean, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, boolean: Boolean, elementAnnotations: List<Annotation> = emptyList())

Associates boolean with primitive key and annotates boolean with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, float: Double, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, float: Double, elementAnnotations: List<Annotation> = emptyList())

Associates float with primitive key and annotates float with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, integer: Long, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, integer: Long, elementAnnotations: List<Annotation> = emptyList())

Associates integer with primitive key and annotates integer with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, string: String, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, string: String, elementAnnotations: List<Annotation> = emptyList())

Associates string with primitive key and annotates string with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, localDate: NativeLocalDate, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, localDate: NativeLocalDate, elementAnnotations: List<Annotation> = emptyList())

Associates localDate with primitive key and annotates localDate with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, localDateTime: NativeLocalDateTime, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, localDateTime: NativeLocalDateTime, elementAnnotations: List<Annotation> = emptyList())

Associates localDateTime with primitive key and annotates localDateTime with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, localTime: NativeLocalTime, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, localTime: NativeLocalTime, elementAnnotations: List<Annotation> = emptyList())

Associates localTime with primitive key and annotates localTime with elementAnnotations.

fun TomlTableBuilder.literal(key: Any?, offsetDateTime: NativeOffsetDateTime, vararg elementAnnotations: Annotation)
fun TomlTableBuilder.literal(key: Any?, offsetDateTime: NativeOffsetDateTime, elementAnnotations: List<Annotation> = emptyList())

Associates offsetDateTime with primitive key and annotates offsetDateTime with elementAnnotations.

Link copied to clipboard

Creates a NativeLocalDate by parsing text against ISO-8601 standard.

Link copied to clipboard

Creates a NativeLocalDateTime by parsing text against ISO-8601 standard.

Link copied to clipboard

Creates a NativeLocalTime by parsing text against ISO-8601 standard.

Link copied to clipboard

Creates a NativeOffsetDateTime by parsing text against ISO-8601 standard.

Link copied to clipboard

Parses the content of nativeReader into equivalent representation of TomlTable.

Link copied to clipboard
fun TomlArrayBuilder.table(vararg elementAnnotations: Annotation, block: TomlTableBuilder.() -> Unit)
fun TomlArrayBuilder.table(elementAnnotations: List<Annotation> = emptyList(), block: TomlTableBuilder.() -> Unit)

Adds a TomlTable built with block to this array and annotates it with elementAnnotations.

fun TomlTableBuilder.table(key: Any?, vararg elementAnnotations: Annotation, block: TomlTableBuilder.() -> Unit)
fun TomlTableBuilder.table(key: Any?, elementAnnotations: List<Annotation> = emptyList(), block: TomlTableBuilder.() -> Unit)

Associates a TomlTable built with block with primitive key and annotates the table with elementAnnotations.

Link copied to clipboard
Link copied to clipboard

Returns content as Boolean only if it is "true" or "false", otherwise null.

Link copied to clipboard

Returns content as Byte.

Link copied to clipboard

Returns content as Byte only if it can be Byte, otherwise null.

Link copied to clipboard

Returns content as Char.

Link copied to clipboard

Returns content as Char only if the length is exactly 1, otherwise null.

Link copied to clipboard
Link copied to clipboard

Returns content as Double only if it can be an exact Double or inf/+inf/-inf/nan, otherwise null.

Link copied to clipboard
inline fun <E : Enum<E>> TomlLiteral.toEnum(serializersModule: SerializersModule = EmptySerializersModule()): E

Returns content as an enum value of the corresponding type.

Link copied to clipboard
inline fun <E : Enum<E>> TomlLiteral.toEnumOrNull(serializersModule: SerializersModule = EmptySerializersModule()): E?

Returns content as an enum value of the corresponding type only if it suits in, otherwise null.

Link copied to clipboard
Link copied to clipboard

Returns content as Float only if it can be an exact Float or inf/+inf/-inf/nan, otherwise null.

Link copied to clipboard

Returns content as Int.

Link copied to clipboard

Returns content as Int only if it can be Int, otherwise null.

Link copied to clipboard
Link copied to clipboard

Returns content as TomlLocalDate only if it can be parsed, otherwise null.

Link copied to clipboard

Returns content as TomlLocalDateTime only if it can be parsed, otherwise null.

Link copied to clipboard
Link copied to clipboard

Returns content as TomlLocalTime only if it can be parsed, otherwise null.

Link copied to clipboard

Returns content as Long.

Link copied to clipboard

Returns content as Long only if it can be Long, otherwise null.

Link copied to clipboard
inline fun Toml(from: Toml = Toml, config: TomlConfigBuilder.() -> Unit): Toml

Creates a Toml with from as default and config as configuration.

Link copied to clipboard
fun TomlArray(vararg values: Any?): TomlArray

Creates a TomlArray with values.

fun TomlArray(iterable: Iterable<*>): TomlArray

Creates a TomlArray from iterable.

Link copied to clipboard

Creates a TomlLiteral from boolean.

Creates a TomlLiteral from byte.

Creates a TomlLiteral from char.

Creates a TomlLiteral from double.

Creates a TomlLiteral from float.

Creates a TomlLiteral from int.

Creates a TomlLiteral from long.


Creates a TomlLiteral from short.

Creates a TomlLiteral from string.

Creates a TomlLiteral from uByte.

Creates a TomlLiteral from uInt.

Creates a TomlLiteral from uLong.

Creates a TomlLiteral from uShort.

Creates a TomlLiteral from localDate.

Creates a TomlLiteral from localDateTime.

Creates a TomlLiteral from localTime.

Creates a TomlLiteral from offsetDateTime.

inline fun <E : Enum<E>> TomlLiteral(enum: E, serializersModule: SerializersModule = EmptySerializersModule()): TomlLiteral

Creates a TomlLiteral from enum.

Link copied to clipboard

Creates a TomlLocalDate by parsing text against ISO-8601 standard.

Link copied to clipboard

Retrieves the default KSerializer for NativeLocalDate in TOML.

Link copied to clipboard

Creates a TomlLocalDateTime by parsing text against ISO-8601 standard.

Link copied to clipboard

Retrieves the default KSerializer for NativeLocalDateTime in TOML.

Link copied to clipboard

Creates a TomlLocalTime by parsing text against ISO-8601 standard.

Link copied to clipboard

Retrieves the default KSerializer for NativeLocalTime in TOML.

Link copied to clipboard

Creates a TomlOffsetDateTime by parsing text against ISO-8601 standard.

Link copied to clipboard

Retrieves the default KSerializer for NativeOffsetDateTime in TOML.

Link copied to clipboard
fun TomlTable(vararg entries: Pair<*, *>): TomlTable

Creates a TomlTable with entries.

fun TomlTable(map: Map<*, *>): TomlTable

Creates a TomlTable from map.

Link copied to clipboard

Returns content as TomlOffsetDateTime only if it can be parsed, otherwise null.

Link copied to clipboard
Link copied to clipboard

Returns content as Short only if it can be Short, otherwise null.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Returns content as UByte only if it can be UByte, otherwise null.

Link copied to clipboard

Returns content as UInt.

Link copied to clipboard

Returns content as UInt only if it can be UInt, otherwise null.

Link copied to clipboard
Link copied to clipboard

Returns content as ULong only if it can be ULong, otherwise null.

Link copied to clipboard
Link copied to clipboard

Returns content as UShort only if it can be UShort, otherwise null.