All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ru.astrainteractive.astralibs.serialization.YamlStringFormat.kt Maven / Gradle / Ivy

There is a newer version: 3.14.1
Show newest version
package ru.astrainteractive.astralibs.serialization

import com.charleskorn.kaml.Yaml
import com.charleskorn.kaml.YamlConfiguration
import kotlinx.serialization.StringFormat

/**
 * This [YamlStringFormat] will help you to parse data from your config.yml file
 */
@Suppress("MemberVisibilityCanBePrivate")
class YamlStringFormat(
    val configuration: YamlConfiguration = Yaml.default.configuration.copy(
        encodeDefaults = true,
        strictMode = false
    ),
    val yaml: Yaml = Yaml(
        serializersModule = Yaml.default.serializersModule,
        configuration = configuration
    )
) : StringFormat by yaml




© 2015 - 2024 Weber Informatics LLC | Privacy Policy