All Downloads are FREE. Search and download functionalities are using the official Maven repository.

se.ansman.kotshi.model.GlobalConfig.kt Maven / Gradle / Ivy

Go to download

An annotations processor that generates Moshi adapters from Kotlin data classes

There is a newer version: 3.0.0
Show newest version
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
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy