Skip to content
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

Use new JSON unquoted literal in UnknownPolymorphicSerializer #436

Open
Whathecode opened this issue Mar 12, 2023 · 0 comments
Open

Use new JSON unquoted literal in UnknownPolymorphicSerializer #436

Whathecode opened this issue Mar 12, 2023 · 0 comments
Labels
enhancement Nice to have, non-functional requirements.

Comments

@Whathecode
Copy link
Member

kotlinx.serialization 1.5.0 introduced the ability to output unquoted literals:

In this release, there is a new addition to this API: JsonUnquotedLiteral constructor function.
It allows to produce a string that is not quoted in the Json output. This function has a lot of valuable
applications: from writing unsigned or large numbers to embedding whole Json documents without the need for re-parsing.
For an example, read the Encoding literal Json content docs.

It sounds like this can potentially be used to support an implementation of UnknownPolymorphicSerializer which doesn't rely on hacking into serializer's internals.

@Whathecode Whathecode added the enhancement Nice to have, non-functional requirements. label Mar 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Nice to have, non-functional requirements.
Projects
None yet
Development

No branches or pull requests

1 participant