Closed jskov-jyskebank-dk closed 6 months ago
This is how it looks with the old generator:
public static final String JSON_PROPERTY_INDBERETNINGS_DATO = "indberetnings_dato";
@JsonProperty(JSON_PROPERTY_INDBERETNINGS_DATO)
@JsonDeserialize(using = _LocalDateJacksonDeserializer.class)
@JsonSerialize(using = _LocalDateJacksonSerializer.class)
private LocalDate indberetningsDato;
And the new:
public static final String JSON_PROPERTY_INDBERETNINGS_DATO = "indberetnings_dato";
@Schema(description = "Dato for hvornår der indberettes")
@JsonbProperty(JSON_PROPERTY_INDBERETNINGS_DATO)
private LocalDate indberetnings_dato;
Property naming rule should probably not change - to _ before type fixing
Yes, getter/setter naming must match property
naming-rules-property = REGEXP/_/-/; PROPERTYNAME
should probably be the default - or PROPERTYNAME should default to camelcasing on _ (but then it breaks for enums)
It seems that fields in the generated classes named with _ (default?) will not work correctly with jsonb.
Problem is (it seems) that the getter/setter does not match the expected bean-naming for the field.
This is not a problem (that I know of) with jackson. So may be jsonb-specific.
Works if the property naming annotation is moved to the setter (for deserialization)
https://javaee.github.io/jsonb-spec/docs/user-guide.html#changing-property-names
(Allan)