Skip to content

Conversation

@jgillich
Copy link
Collaborator

Previously it only worked with JSON, now it works with any format supported by kotlinx.serialization

@jgillich jgillich force-pushed the position-serializer branch from 6f3c3f0 to 53fa3ed Compare August 30, 2025 16:39
Previously it only worked with JSON, now it works with any format supported by kotlinx.serialization
@jgillich jgillich force-pushed the position-serializer branch from 1fd80ad to 4c1c3db Compare August 30, 2025 16:41
@westnordost
Copy link
Collaborator

westnordost commented Sep 22, 2025

Ah, maybe that's the reason why the serializers/deserializers in maplibre/maplibre-java#40 look more complicated - because they are not limited to JSON.

It would be consistent to either support any format supported by kotlinx.serialization or only JSON for all model classes. Maybe the code could be somewhat copied from the mentioned PR.

(But the question is, why should one deserialize/serialize GeoJSON to anything else than JSON?)

@sargunv
Copy link
Collaborator

sargunv commented Sep 24, 2025

It would be consistent to either support any format supported by kotlinx.serialization or only JSON for all model classes.

Agreed (in particular, should support any format supported by kotlinx.serialization unless there's a good reason not to). Should file an issue for the remaining serializers.

(But the question is, why should one deserialize/serialize GeoJSON to anything else than JSON?)

I'm also curious, though I guess protobuf and BSON are probably common enough use cases.

@sargunv sargunv merged commit 4e056ae into maplibre:main Sep 24, 2025
4 checks passed
@jgillich
Copy link
Collaborator Author

jgillich commented Sep 24, 2025

Android datastore uses protobuf, and rememberSerializable might too

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