Kotlin Multiplatform parser and compile-time serializer/deserializer for TOML format (Native, JS, JVM) based on KxS
Updated Kotlin to version 1.9.22 in https://github.com/akuleshov7/ktoml/pull/250
A bunch of bug fixes, infra and logging enhancements.
Enhanced Map decoding: Now, you can decode key-value pairs and tables to Map without prior knowledge of their names.
@Serializable
data class MyClass(
val a: Map<String, Map<String, String>>
)
[a]
[a.innerTable]
d = 5
[a.otherInnerTable]
d = "String"
@Serializable
@JvmInline
value class Test(val myTest: Info)
ACTIVITY_COMPOSE = {}
Full Changelog: https://github.com/akuleshov7/ktoml/compare/v0.5.0...v0.5.1
TomlConfig
and left only those that use TomlInputConfig
or TomlOutputConfig
;:heavy_exclamation_mark: Now toml-file
is only one of the example for reading the data from source. For your particular case you can implement your own source provider based on okio.Source. For this purpose we have prepared toml-source
module and implemented an example with java streams for JVM target.
// add com.akuleshov7:ktoml-source to your project
import com.akuleshov7.ktoml.source
val resultFromString = TomlFileReader.decodeFromSource<MyClass>(serializer(), /* your source */)
val resultFromList = TomlFileReader.partiallyDecodeFromSource<MyClass>(serializer(), /* your source */, /* table name */)
Full Changelog: https://github.com/akuleshov7/ktoml/compare/v0.4.1...v0.5.0
Full Changelog: https://github.com/akuleshov7/ktoml/compare/v0.4.0...v0.4.1
Full Changelog: https://github.com/akuleshov7/ktoml/compare/v0.3.0...v0.4.0
Awesome release with serialization, finally! 🤞 ❤️ Ktoml now supports it!
Full Changelog: https://github.com/akuleshov7/ktoml/compare/v0.2.13...v0.3.0
Minor release to add new targets and support new Kotlin version
Full Changelog: https://github.com/akuleshov7/ktoml/compare/v0.2.12...v0.2.13
Technical release with refactoring, new fundamental logic and library migrations
@bishiboosh @akuleshov7 @NightEule5 thank you for this outstanding contribution!
Contributors to this release: @NightEule5 @Peanuuutz @vitusortner @akuleshov7