
Delimiter-separated value parsing and serialization with type-safe mappings, streaming support for large files, and customizable delimiters, quoting behavior and header naming strategies.
Kotlin DSV is a library for working with delimiter-separated values (CSV, TSV, and custom formats) in Kotlin Multiplatform projects.
Features:
Add Kotlin DSV to your project:
dependencies {
implementation("dev.sargunv.kotlin-dsv:kotlin-dsv:VERSION")
}@Serializable
data class Person(val name: String, val age: Int, val email: String?)
// Encode to CSV string
val people = listOf(
Person("A", 30, "a@example.com"),
Person("B", 25, null)
)
val csv = Csv.encodeToString(people)
// Decode from CSV string
val decoded = Csv.decodeFromString<Person>(csv)See the project site for more info and examples.
Kotlin DSV is a library for working with delimiter-separated values (CSV, TSV, and custom formats) in Kotlin Multiplatform projects.
Features:
Add Kotlin DSV to your project:
dependencies {
implementation("dev.sargunv.kotlin-dsv:kotlin-dsv:VERSION")
}@Serializable
data class Person(val name: String, val age: Int, val email: String?)
// Encode to CSV string
val people = listOf(
Person("A", 30, "a@example.com"),
Person("B", 25, null)
)
val csv = Csv.encodeToString(people)
// Decode from CSV string
val decoded = Csv.decodeFromString<Person>(csv)See the project site for more info and examples.