How can we create add field level annotations for java 17 record class?
record Rectangle(double length, double width) { }
yes we can use field level annotations (annotation with @Target(ElementType.FIELD)
in the defination.
@JsonInclude(Include.NON_NULL)
record Rectangle(
@JsonProperty("lengthAlias") double length,
double width) { }