-
Notifications
You must be signed in to change notification settings - Fork 668
Closed
Description
Hi,
I want to write a custom serializer, where I also need to access the configuration of the Json class . But it is marked a internal
public sealed class Json(internal val configuration: JsonConf) : StringFormat {So I have to use this hack to access the configuration
val decoder: JsonDecoder = ...
var classDiscriminatorConfig: String? = null
Json(decoder.json) {
classDiscriminatorConfig = classDiscriminator // the value I want to know
}So I would like to change the visibility of kotlinx.serialization.json.Json.configuration to public:
public sealed class Json(val configuration: JsonConf) : StringFormat {and also kotlinx.serialization.json.internal.JsonConf to be to public (and moving to package kotlinx.serialization.json)
package kotlinx.serialization.json
...
data class JsonConf