Release v0.5.0
Breaking changes
- In this release, we have made some changes to the library's API and removed old deprecated methods;
- For instance, we removed methods that used the deprecated
TomlConfig
and left only those that useTomlInputConfig
orTomlOutputConfig
; - Additionally, we have started to stream data during decoding and parsing, which should improve performance;
- However, this may affect the way you use some ktoml methods.
Changes that deserve your attention
- A significant change for streaming data and a new module, ktoml-source, for custom data sources (via okio Source) by @bishiboosh in #117;
- We have finally added support for multiline strings, including both literal and basic strings and multiline arrays, by @BOOMeranGG and @NightEule5 (#184, #183);
- Support for Kotlin 1.8.21, Kotlinx.serialization 1.5.0, and Gradle 8;
- Backward compatibility support for Java 8 by @akuleshov7 in #202;
❗ 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 */)
What else is new
- We have added iosSimulatorArm64 target by @akuleshov7 in #186;
- Regexes have been replaced with functions to enhance performance and prevent input-related issues by @NightEule5 in #19;
- Extra information has been added to errors and exceptions by @akuleshov7 in #212;
Infrastructure changes
- Test to check regression #189 by @akuleshov7 in #192
- Configure Renovate by @renovate in #194
- Customizations for the renovate bot by @akuleshov7 in #199
- Adding an action-script for an automated update of yarn.lock by @akuleshov7 in #206
- Update dependency gradle to v8.1.1 by @renovate in #211
- Adding a test to validate line numbers and fix for multiline strings by @akuleshov7 in #217
Full Changelog: v0.4.1...v0.5.0