Hi Dmitry;
comments inline
2016-01-29 18:29 GMT+01:00 <dmitry.kornilov_at_oracle.com>:
> Hi,
>
> I just pushed a spec update. Please review it and make your comments.
>
> Change list:
>
> 1. Changed enum processing. Method name() is used for serialization
> instead of toSting().
>
>
+1
>
> 2. Changed serialization rules of object properties with Optional type
> and null value.
>
> Original:
> "Empty optional instances serialized as object instance properties are
> ignored during serialization."
>
> Changed to:
> "Empty optional instances serialized as object instance properties are
> treated as null."
>
> The main purpose of this change is to make Optional fields processing
> consistent with Optional array elements and properly behaviour in case
> of @JsonbNillable(value=false).
>
> Roman Grigoriadi is preparing a detailed description of this topic at
> the moment with samples etc. It will be posted in a few days for
> discussion.
>
>
Sounds consistent.
>
> 3. @JsonbTransient annotation made allowed only on fields.
>
> This text is removed:
>
> "When placed on a class, indicates that the class shouldn't be mapped
> to JSON by itself. Properties on such class will be mapped to JSON
> along with its derived classes, as if the class is inlined."
>
>
+1 while "fields" means field or property.
>
> 4. Removed 'smallest possible type' rule for number types. JSON number
> type is always mapped to BigDecimal in case target type is not
> specified. This is done to make numbers serialization and
> deserialization consistent. We always serialize java.lang.Number by
> converting it to BigDecimal first and we always deserializing JSON
> number type to BigDecimal if target type java.lang.Number or Object.
>
>
Should we specify it? Didn't check lately but I think jsonp handles it so
maybe better to not add rules we could conflict there.
>
> 5. @JsonbValue annotation is removed. Adapters should be used instead.
>
>
sounds good
> Thanks,
> Dmitry Kornilov
>