toml Mapper
Creates a new TOML mapper with the given configuration. In the interest of efficiency, consider creating a mapper once and then keeping it around for the duration of your program, rather than re-creating it every time you need to process a TOML value.
Without any extra configuration, TOML types can be transcoded to/from Kotlin types as follows:
List: List, MutableList, Collection or Iterable
Map: Map, MutableMap, SortedMap, or any class with primary constructor fields corresponding to the keys of the TOML document.
Bool: Boolean
Double: Double, Float or BigDecimal
Integer: Int, Long, Float, Double, BigDecimal or BigInteger
LocalDate: LocalDate
LocalTime: LocalTime
LocalDateTime: LocalDateTime
OffsetDateTime: OffsetDateTime
Additionally, any subclass of TomlValue can always be transcoded to/from itself, and any value which could be transcoded to/from a type T
can also be transcoded to/from Lazy<T>
.
Creates a mapper which inherits all its configuration from the given baseMapper.
Note that custom encoders/decoders always take precedence over mappings. If your mapper inherits from a mapper which contains a custom decoder for some type T, this decoder will not be overridden by subsequent calls to TomlMapperConfigurator.mapping, unless the decoder's TomlMapper subtype is something other than TomlValue.Map.