Skip to content

Commit

Permalink
chore: Remove unneeded convenience functions
Browse files Browse the repository at this point in the history
Turns out these are already provided by kotlinx.serialization itself via
extension functions on `StringFormat`, see [1].

[1]: https://github.com/Kotlin/kotlinx.serialization/blob/d4d066d72a9f92f06c640be5a36a22f75d0d7659/core/commonMain/src/kotlinx/serialization/SerialFormat.kt#L106-L123
  • Loading branch information
sschuberth committed Oct 30, 2024
1 parent 36dc6af commit 1dd41bf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/commonMain/kotlin/com/charleskorn/kaml/Yaml.kt
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ public class Yaml(
return input.decodeSerializableValue(deserializer)
}

public inline fun <reified T> decodeFromString(string: String): T =
decodeFromString(serializersModule.serializer<T>(), string)

override fun <T> decodeFromString(
deserializer: DeserializationStrategy<T>,
string: String,
Expand Down Expand Up @@ -98,9 +95,6 @@ public class Yaml(
encodeToBufferedSink(serializer, value, sink.buffer())
}

public inline fun <reified T> encodeToString(value: T): String =
encodeToString(serializersModule.serializer<T>(), value)

override fun <T> encodeToString(
serializer: SerializationStrategy<T>,
value: T,
Expand Down

0 comments on commit 1dd41bf

Please sign in to comment.