se.ansman.kotshi.model.GlobalConfig.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of compiler Show documentation
Show all versions of compiler Show documentation
An annotations processor that generates Moshi adapters from Kotlin data classes
package se.ansman.kotshi.model
import se.ansman.kotshi.KotshiJsonAdapterFactory
import se.ansman.kotshi.SerializeNulls
data class GlobalConfig(
val useAdaptersForPrimitives: Boolean,
val serializeNulls: SerializeNulls
) {
constructor(factory: KotshiJsonAdapterFactory) : this(
useAdaptersForPrimitives = factory.useAdaptersForPrimitives,
serializeNulls = factory.serializeNulls
)
companion object {
val DEFAULT = GlobalConfig(
useAdaptersForPrimitives = false,
serializeNulls = SerializeNulls.DEFAULT
)
}
}