Property

@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Property(val serializedName: String = automatic)

Annotated properties of a class annotated with @Json will be used for encoding instances of the class as JSON even if @Json.encoding would exclude them by default. This does not apply if @Json.encoding is set to none in which case an error will be raised.

This annotation can also be used to further configure how a specific property is being decoded and encoded.

Properties

Link copied to clipboard

Defines the value of the JSON object key when decoding or encoding this property.