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

Change MediaProduct.extras type #116

Merged
merged 1 commit into from
Oct 18, 2024
Merged

Change MediaProduct.extras type #116

merged 1 commit into from
Oct 18, 2024

Conversation

subhasha1
Copy link
Contributor

Changed from: Map<String, String?>?
Changed to: Map<String, Extra?>?.

Extra is defined as:

sealed interface Extra {
    data class Bool(val value: Boolean) : Extra
    data class Number(val value: kotlin.Number) : Extra
    data class Text(val value: String) : Extra
    data class CollectionList(val value: List<Extra>?) : Extra
    data class CollectionMap(val value: Map<String, Extra?>?) : Extra
}

This enables support for more dynamic types and not limited to map of String values.

To support conversion to and from JSON, custom JsonSerializer and JsonDeserializer for Extra are added.

@subhasha1 subhasha1 requested a review from a team as a code owner October 15, 2024 13:50
@subhasha1 subhasha1 closed this Oct 16, 2024
@subhasha1 subhasha1 reopened this Oct 16, 2024
Changed from: Map<String, String?>?
Changed to: Map<String, Extra?>?.

Extra is defined as:
```
sealed interface Extra {
    data class Bool(val value: Boolean) : Extra
    data class Number(val value: kotlin.Number) : Extra
    data class Text(val value: String) : Extra
    data class CollectionList(val value: List<Extra>?) : Extra
    data class CollectionMap(val value: Map<String, Extra?>?) : Extra
}
```
@subhasha1 subhasha1 force-pushed the subhash/update_extras_2 branch from c5b6c4c to 224c053 Compare October 17, 2024 14:18
@subhasha1 subhasha1 added this pull request to the merge queue Oct 18, 2024
Merged via the queue into main with commit 2afafca Oct 18, 2024
7 checks passed
@subhasha1 subhasha1 deleted the subhash/update_extras_2 branch October 18, 2024 08:47
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.

2 participants