https://kotlinlang.org logo
#squarelibraries
Title
# squarelibraries
d

Derek Ellis

03/30/2023, 2:06 PM
How does Moshi look up generated type adapters at runtime? Looking through the source I see it tries to create them from factories, but there are no factories(?) for generated adapters. (I'm curious because I'm trying to implement a similar strategy for something else)
m

mbonnin

03/30/2023, 2:08 PM
It uses a tiny bit of reflection
the adapter for class
Foo
is always
Foo_JsonAdapter
d

Derek Ellis

03/30/2023, 2:13 PM
4 Views