You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KotlinX Serialization recently added Json naming strategies in 1.5.0:
A long-awaited feature (Kotlin/kotlinx.serialization#33) is available in this release.
A new interface, JsonNamingStrategy and Json configuration property namingStrategy allow defining a transformation that is applied to all properties' names serialized by a Json instance.
There's also a predefined implementation for the most common use case: Json { namingStrategy = JsonNamingStrategy.SnakeCase }.
Check out the Kotlin/kotlinx.serialization#2111 for more details and documentation.
This issue has been automatically marked as stale because it has not had any activity in the last 60 days. It will automatically be closed if no further activity occurs in the next seven days to enable maintainers to focus on the most important issues.
If this issue is still affecting you, please comment below within the next seven days.
Thank you for your contributions.
Describe the problem you'd like to solve
There is no naming strategy implementation, so
@SerialName
has to be applied to every variable in a data class:Describe the solution you'd like
A YamlNamingStrategy in the YamlConfiguration.
Describe alternatives you've considered
@SerialName
on every variableAdditional context
KotlinX Serialization recently added Json naming strategies in 1.5.0:
https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-json/kotlinx.serialization.json/-json-naming-strategy
The text was updated successfully, but these errors were encountered: