Annotation Interface JsonName


Gives the name of a record component's member, the string of an enum constant, or the tag that names a record in a sealed interface, in place of its Java name.

record Customer(@JsonName("e-mail") String email) {}

enum Status {
    @JsonName("in-progress") IN_PROGRESS,
    DONE
}

@JsonName("circle")
record Circle(double radius) implements Shape {}
Since:
0.1.0
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the name, taken as it is.
  • Element Details

    • value

      String value
      Returns the name, taken as it is.
      Returns:
      the name