Skip to content

Conversation

friedger
Copy link
Contributor

This PR

val serializer = jsonParser.context.getContextualOrDefault(this)
jsonParser.toJson(serializer, this)
val jsonParser = Json
jsonParser.encodeToJsonElement(this)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I am missing a serializer here. Any ideas what is required? @mirceanis

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really :(
I am not familiar with the latest kotlinx.serialization requirements, unfortunately.


override fun deserialize(decoder: Decoder): Map<String, Any?> {
val asJsonObject: JsonObject = decoder.decodeSerializableValue(JsonObjectSerializer)
assert(decoder is JsonDecoder) {"Only JsonDecoder supported, found " + decoder::class.java}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this safe to assert?

@mirceanis
Copy link
Contributor

Thank you for the contribution!
I will review as soon as I can and try to reply to your comments

@PeterTheOne
Copy link

@friedger @mirceanis Bump Can we get this fixed, please? :)

@mirceanis
Copy link
Contributor

Hi @PeterTheOne, this repo has fallen below my radar as I've been focusing more on the typescript side of things.
Would you like to contribute to the maintenance of this project?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants