Skip to content

Support CBOR and Protobuf with Kotlin Serialization #27628

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

Closed
wants to merge 3 commits into from

Conversation

iain-henderson
Copy link

I noticed that Spring only had built in support for Kotlin Serializations to/from JSON, but that the existing implementation for Kotlin Serialization of JSON was mostly sufficient for a more general implementation.

With a few modifications Spring gains support for Kotlin Serialization to CBOR and Protocol Buffers AND the ability to manually configure other Kotlin Serialization types.

…lass hierarchy.

Kotlin Serialization has two primary types of serialization, Binary and String. JSON Kotlin Serialization uses kotlinx.serialization.StringFormat.

This class hierarchy treats the Kotlin Serialization JSON classes as concrete implementations of less specific Kotlin Serialization String classes.
…l Buffer serialization

Add Kotlin Serialization Binary classes necessary to implement CBOR and Protocol Buffer encoders, decoders, and converters.

Update automatic configuration to utilize these classes if the necessary dependencies are on the classpath.
@pivotal-cla
Copy link

@iain-henderson Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@iain-henderson Thank you for signing the Contributor License Agreement!

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Nov 1, 2021
@rstoyanchev rstoyanchev added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Nov 11, 2021
@iain-henderson
Copy link
Author

Conflicts are caused by using constants for MediaTypes. With more input from the project owners, I'm willing to fix it.

@bclozel bclozel added the theme: kotlin An issue related to Kotlin support label Feb 19, 2022
@rstoyanchev rstoyanchev added this to the Triage Queue milestone Sep 29, 2022
@poutsma poutsma closed this in b8243e6 Oct 6, 2022
@poutsma poutsma removed the status: waiting-for-triage An issue we've not yet triaged or decided on label Oct 6, 2022
@poutsma poutsma modified the milestones: Triage Queue, 6.0.0-RC1 Oct 6, 2022
@poutsma poutsma self-assigned this Oct 6, 2022
@poutsma poutsma added the type: enhancement A general enhancement label Oct 6, 2022
@poutsma
Copy link
Contributor

poutsma commented Oct 6, 2022

Thank you for submitting a PR, @iain-henderson. After making some changes, I have merged it in b8243e6.

@poutsma poutsma changed the title Implement support for Kotlin Serialization of CBOR and Protocol Buffers Support CBOR and Protobuf with Kotlin Serialization Oct 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) theme: kotlin An issue related to Kotlin support type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants