mapbox / mapbox/mapbox-plugins-android

Symbol options does not support kotlinx serialization

Open
#1,195 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
242
Forks
116
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the SymbolOptions class and its inherited Options data property, then inspect how the current com.google.gson.JsonElement type is used. Determine whether kotlinx.serialization.json.JsonElement can be supported without breaking existing Gson usage, and verify the resulting API behavior with the relevant project tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, kotlin
Domain
mobile-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.