Closed brentwatson closed 4 months ago
Thanks for starting this! There are some things I think we need to do along the way.
ImmutableCollectionsJsonAdapter.Factory
, rather than one for each.@brentwatson are you planning to continue this?
@ZacSweers yes, I was hoping to get to it this week, but wasn't able to. Next week I'm going to prep for DroidCon NY talk, and then AFK for a week after that so it likely won't be until late Sept / early Oct. If you want to close this you can and I can open a new PR when I have something ready. Or we can merge this as a v1 and I'll do Set and Collection support as a follow-up PR... up to you
On Sat, Sep 2, 2023, 8:36 PM Zac Sweers @.***> wrote:
@brentwatson https://github.com/brentwatson are you planning to continue this?
— Reply to this email directly, view it on GitHub https://github.com/ZacSweers/MoshiX/pull/478#issuecomment-1703990998, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKE6OW2OX5XJGJK4J4HM23XYPUKHANCNFSM6AAAAAA3V64PIQ . You are receiving this because you were mentioned.Message ID: @.***>
No worries, just continue this PR when you're ready. Just asking as I'm about to cut a bugfix release
Implemented in #586
Resolve issue https://github.com/ZacSweers/MoshiX/issues/460
Moshi JsonAdapters for kotlinx.collections.immutable collection types
Note the JsonAdapterFactory implementations in this PR are similar to the core Moshi versions of the adaptors (eg: MapJsonAdapter.kt).
Usage
Gradle dependency
Immutable Collection Adapters
Use
addKotlinXImmutableAdapters()
to addPersistentListJsonAdapterFactory
andPersistentMapJsonAdapterFactory
type adapters. These will deserialize standard JSON list and dictionary types into kotlinx.collections.immutablePersistentList
andPersistentMap
types.