-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API doc is not in sync with the usage #34
Comments
Hi, see the dependent on the versions table yamlkt 0.10.2 needs only kotlin 1.5.20 and kotlinx-serialization 1.2.1. val yaml = Yaml()
yaml.decodeFromString(MyType.serializer(), payload) Works for me perfectly. |
Thanks @YokiToki , yes it works even with the |
This is probably an IDE bug introduced in Kotlin 1.5.30. The compiler is still compiling fine while IDE reports such errors. |
https://github.com/Him188/yamlkt/blob/master/yamlkt/src/commonMain/kotlin/net.mamoe.yamlkt/Yaml.kt#L26 ^ These are the documentation I was referring to. Both suggest to use |
@rizsotto Yes, I missed them during migration from serialization 0.10 to 0.20. Thank you. |
The API doc is suggest to use
Yaml.parse
method, which is not exists in the latest version I'm using.I'm trying to parse a string into a specific type.
Yaml.decodeFromString(MyType.serializer(), payload)
is what I'm using. It works, but Intellij-IDEA is warning aboutCannot access class 'kotlinx.serialization.DeserializationStrategy'. Check your module classpath for missing or conflicting dependencies
.Please advice, what is the correct usage of the library?
The text was updated successfully, but these errors were encountered: