FallbackJsonAdapter

@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class FallbackJsonAdapter(val value: KClass<out JsonAdapter<*>>)

Use this annotation to specify specific fallback adapter to use. This is a proxy to PolymorphicJsonAdapterFactory.withFallbackJsonAdapter.

The referenced class must have a single primary constructor that accepts either a Moshi parameter or no parameters.

Only one of DefaultObject, FallbackJsonAdapter, or DefaultNull may be used on a moshi-sealed class.

Properties

Link copied to clipboard
val value: KClass<out JsonAdapter<*>>