Annotation to be placed on classes that Kotshi should generate a JsonAdapter for.
The annotation should only be placed on Kotlin data classes or Kotlin enums.
To customize the name of a property when serialized, use the JsonProperty annotation on the property or enum instance;
data class Person(
val name: String,
val email: String?,
// This property uses a custom getter name which requires two annotations
val hasVerifiedAccount: Boolean,
// This property has a different name in the Json than here so @Json must be applied
@JsonProperty(name = "sign_up_date")
val signUpDate: Date,
// This field has a json qualifier applied, the generated adapter will request an
// adapter with the qualifier.
val jobTitle: String?
A flag to enable/disable the use of adapters to read and write primitive values. The default value is the same as KotshiJsonAdapterFactory.useAdaptersForPrimitives. If you don't actually need it, it's better to not use adapters for performance reasons.
Enable or disable null serialization for this adapter and child adapters (unless they override it).