bluelinelabs / bluelinelabs/LoganSquare
Parse list with custom TypeConverter?
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 303
- PR merge metrics
- No merged PRs in 30d
Description
Hello there!
I have a custom `TypeConverter` which extends `StringBasedTypeConverter` and converts a hex string to an `Integer` (it's a representation of a color).
The API I'm working with can return a single color (where this custom `TypeConverter` works great) or an array of colors. I'm super new to JSON parsing, and I'd like to use this custom `TypeConverter` to also deserialize an array of colors, but I can't quite figure out how to do this.
In summary, I can get `"#0d9ddb"` to the `Integer` type, and I'm trying to get `["#0d9ddb", "#00ba6e"]` to the `int[]` or `List` type. Does anyone know how to achieve this?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing how the custom TypeConverter handles the single color value, then inspect the collection deserialization path for int[] and List. Done means documenting or confirming the supported way to apply the converter to each array element, with an example covering both requested input forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100