Client and backend. This class is shared: the same code is compiled into your app and into your server, so everything on this page works in both.

@Retention(CLASS) @Target({FIELD})

public @interface JsonProperty

Renames a @Mapped field in the JSON projection. The default JSON key is the field name; @JsonProperty lets a field map to snake_case or any alternative spelling without touching the Java identifier.

The server’s generated codecs read it too, so a class shared between an app and its backend has one JSON form on both sides.

Methods

public abstract String value()The JSON key.

Method details

value

public abstract String value()
The JSON key.