Registering a JsonAdapter directly should only be ...
# squarelibraries
j
Registering a JsonAdapter directly should only be used for the most trivial adapters. Otherwise you probably want to prefer using `@ToJson`/`@FromJson` or
JsonAdapter.Factory
s
Thanks, Jake!
Does Kotlin Codegen not generate the
JsonAdapter.Factory
implementation?
j
I have no idea. I use kotlinx.serialization for JSON in Kotlin.
s
Yeah I would normally but I need my deserialized JSON to be injected with stuff (primarily my rest api services) as it’s json-ld and I was having a nightmare getting my custom serializers that injects the extra stuff to be used.