mapbox / mapbox-plugins-android

Mapbox Android Plugins are a collection of libraries that extend our other SDKs, helping you design powerful mapping features while the plugins handle most of the heavy lifting.
https://www.mapbox.com/android-docs/plugins/overview/
BSD 2-Clause "Simplified" License
241 stars 120 forks source link

Symbol options does not support kotlinx serialization #1195

Open guillermolc opened 3 years ago

guillermolc commented 3 years ago

Good morning, I would like to know if you could modify the Symbol Options class in the data property, so that it accepts JsonElements from Kotlinx.

Example:

public class SymbolOptions extends Options { private JsonElement data; ---> This only accept a com.google.gson.JsonElement }

And need

public class SymbolOptions extends Options { private JsonElement data; ---> kotlinx.serialization.json.JsonElement }

It would be nice if you could apply this, especially since many people are starting to use this extension in cross-platform projects and import Gson and Kotlinx Serialization at the same time, it does not make sense :)

Good day

Nek-12 commented 2 years ago

Seems to me like a poor design choice. Including arbitrary in-memory data for each annotation should likely be done using Any? type or at least String? so that we can use our own serialization engines. Ideally, we shouldn't be burdened by whatever serialization library MapBox uses under the hood. Any updates on this?