Kotshi Json Adapter Factory
annotation class KotshiJsonAdapterFactory(val useAdaptersForPrimitives: Boolean = false, val serializeNulls: SerializeNulls = SerializeNulls.DEFAULT)(source)
Annotation to be applied on an abstract class that implements JsonAdapter.Factory to tell Kotshi to generate a factory containing all adapters in this module.
Example:
@KotshiJsonAdapterFactory
object ApplicationJsonAdapterFactory : JsonAdapter.Factory by KotshiApplicationJsonAdapterFactory
Content copied to clipboard
Parameters
use Adapters For Primitives
A flag to enable or disable the use of adapters on a module basis. Since using adapters is worse for performance don't enable it unless you need it. This flag can be overridden in each adapter using JsonSerializable.useAdaptersForPrimitives.
serialize Nulls
Enable or disable null serialization for adapters in this factory. Only applied to adapters that don't specify an explicit value.