[ 
https://issues.apache.org/jira/browse/JOHNZON-341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17337290#comment-17337290
 ] 

Romain Manni-Bucau commented on JOHNZON-341:
--------------------------------------------

Hi,

 

My personal preference is to make users happy, with current default we got no 
complain so seems we reached that and increase number of happy users compared 
to strict spec default.

 

Also note that for future compat current option still looks snaer: 
[https://github.com/eclipse-ee4j/jsonb-api/issues/61]

If this issue is closed as wont fix it can probably be revised but users tend 
to like it (i never said i do but we dont care of it right? ;)).

> @JsonbProperty MUST NOT serialize NON-PUBLIC fields according to JSON-B 
> specification
> -------------------------------------------------------------------------------------
>
>                 Key: JOHNZON-341
>                 URL: https://issues.apache.org/jira/browse/JOHNZON-341
>             Project: Johnzon
>          Issue Type: Bug
>          Components: JSON-B
>    Affects Versions: 1.2.10
>            Reporter: Markus Karg
>            Priority: Major
>
> The JSON-B specification unambiguously defines that @JsonbProperty's sole job 
> is to define _the name mapping_ of properites, while ONLY PUBLIC fields are 
> to be actually serialized.
> Due to https://issues.apache.org/jira/browse/JOHNZON-100 Johnzon 1.0.9 
> actually serializes ALL non-public fields when they are annotated by 
> @JsonbProperty.
> As a result, there is a difference between the serialized output of Johnzon 
> and Yasson (the RI for JSON-B v1). As discussed in 
> [https://github.com/eclipse-ee4j/jsonb-api/issues/271,] Johnzon's current 
> behavior is non-compliant to the spec. Also it leads to confusion and 
> possibly real problems when applications RELY on the serialized form 
> intentionally OMITTING such fields (e. g. for technical or security reasons).
> To overcome the differences in the serialized output between Johnzon and 
> Yasson, and to have a spec-compliant output produced by Johnzon, a solution 
> is to be found, e. g. introduction of a configuration option which defines 
> whether the output is compliant to the spec (only containing PUBLIC fields), 
> or whether it is like before (containing ALL @JsonbProperty annotated 
> fields). 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to