jansupol / jsonbapi

0 stars 0 forks source link

Request to look into adding target locations for the JsonbNillable annotation #52

Open jansupol opened 6 years ago

jansupol commented 6 years ago

While running a hands-on-lab with people wanting to get acquainted with JSON-B a number of participants attempted to apply the @JsonbNillable in places where the @JsonbProperty with boolean nillable should be used.

While the javadocs on @JsonbNillable point in the right direction for the desired functionality, for some people this is not quite intuitive.

Could this be made easier on new JSON-B users by making the annotation @JsonbNillable applicable to places where @JsonbProperty should now be used, or would there be objections making this not feasible/desirable?

jansupol commented 6 years ago
jansupol commented 6 years ago

@bravehorsie Commented That will introduce problem with ambiguous configuration, for example: @JsonbProperty(nillable=false) @JsonbNillable Strig property;

So which nillable takes precedence here? Please note we can't check if both are set to raise exception in that case because of @JsonbProperty default nillable value for example when declared as @JsonbProperty("propName") it defaults to false.