-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Support object adapters which would allow for creating fewer instances of the adapter.
@AdaptedBy(FooAdapter::class)
data class Foo(
val bar: Bar
)
object FooAdapter: JsonAdapter<Foo> {
override fun fromJson(reader: JsonReader): Foo { ... }
override fun toJson(writer: JsonWriter, value: Foo) { ... }
}Currently this gives an error of:
java.lang.IllegalAccessException: class dev.zacsweers.moshix.adapters.AdaptedBy$Factory
cannot access a member of class com.example.FooAdapter with modifiers "private"
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels