Skip to content

Release v0.5.0

Compare
Choose a tag to compare
@github-actions github-actions released this 10 May 21:58

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 use TomlInputConfig or TomlOutputConfig;
  • 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

Full Changelog: v0.4.1...v0.5.0