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

Add Kotlin KSerializer for LatLng #108

Open
bubenheimer opened this issue Nov 12, 2020 · 5 comments
Open

Add Kotlin KSerializer for LatLng #108

bubenheimer opened this issue Nov 12, 2020 · 5 comments
Assignees
Labels
stale triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@bubenheimer
Copy link

bubenheimer commented Nov 12, 2020

Is your feature request related to a problem? Please describe.
In my fairly pure Kotlin app I need to persist various types of data to disk, including List<LatLng>. I am switching to Kotlin serialization to do this, as it provides a straightforward framework that has recently seen a stable release. For now I intend to use stable Json-based Kotlin serialization, but may switch to a more compact format such as CBOR or protobuf as the respective library artifacts stabilize. LatLng from google-maps is a Java class and needs an external KSerializer to enable this.

Describe the solution you'd like
Add performant KSerializer implementation for LatLng that supports different Kotlin serialization formats, perhaps using the approach from https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#hand-written-composite-serializer

Describe alternatives you've considered
I am writing my own KSerializer based on https://github.com/Kotlin/kotlinx.serialization/blob/master/docs/serializers.md#composite-serializer-via-surrogate. It is not as performant as the suggested hand-written composite serializer approach. It seems unnecessary for app developers to reinvent the wheel - LatLng is essentially a POJO that lends itself to serialization.

@bubenheimer bubenheimer added triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Nov 12, 2020
@stale
Copy link

stale bot commented Mar 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

@stale stale bot added the stale label Mar 19, 2021
@arriolac arriolac removed the stale label Mar 19, 2021
@stale
Copy link

stale bot commented Jul 20, 2021

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

@stale stale bot added the stale label Jul 20, 2021
@bubenheimer
Copy link
Author

Personally I don't need this anymore at this time, I've largely moved this app away from LatLng dependencies to a custom domain-specific typing system. Might still make sense to keep this open, though; others may be interested, and custom typing does imply overhead.

@stale stale bot removed the stale label Jul 20, 2021
@stale
Copy link

stale bot commented Apr 16, 2022

This issue has been automatically marked as stale because it has not had recent activity. Please comment here if it is still valid so that we can reprioritize. Thank you!

@stale stale bot added the stale label Apr 16, 2022
@stale
Copy link

stale bot commented Jun 18, 2023

Closing this. Please reopen if you believe it should be addressed. Thank you for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale triage me I really want to be triaged. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants