MoshiX:Moshi 的 Kotlin 扩展集合
围绕 Moshi JSON 库的一组 Kotlin 扩展,包含 IR 实现、自定义适配器、sealed 类序列化与免 kotlin-reflect 的反射序列化等模块。
MoshiX 是一组针对 Moshi JSON 库的扩展,包含多个模块:moshi-ir 提供 Moshi 与 moshi-sealed 代码生成的 Kotlin IR 实现;moshi-adapters 是一组自定义适配器集合;moshi-immutable-adapters 提供面向 kotlinx.collections.immutable 的 Moshi 适配器;moshi-metadata-reflect 基于 kotlinx-metadata 实现 KotlinJsonAdapterFactory,可在不引入 kotlin-reflect 的情况下对 Kotlin 类进行反射式 Moshi 序列化;moshi-sealed 提供通过 Moshi 多态适配器序列化 Kotlin sealed 类的反射与代码生成两种实现。开发版本的快照发布在 Sonatype 的 snapshots 仓库。采用 Apache License 2.0。