users@jsonb-spec.java.net

[jsonb-spec users] [jsr367-experts] Re: Re: PropertyNamingStrategy with customized property names

From: Romain Manni-Bucau <rmannibucau_at_tomitribe.com>
Date: Sat, 30 Jan 2016 19:17:45 +0100

the opposite, ignore the strategy and use the annotation value


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau

2016-01-30 19:02 GMT+01:00 Roman Grigoriadi <roman.grigoriadi_at_oracle.com>:

> Hi,
>
> you mean ignore a JsonbProperty completely? So for example a bean:
>
> class Pojo {
> @JsonbProperty("appropriateName")
> String propertyWithInaproppriateName;
> }
>
> would become "property_with_inaproppriate_name" when naming strategy is
> set?
>
> Thanks,
> Roman
>
>
> On 01/30/2016 06:22 PM, Romain Manni-Bucau wrote:
>
> Hi
>
> I'd ignore explicit property and just use the strategy in default case.
> Le 30 janv. 2016 18:04, "Roman Grigoriadi" <roman.grigoriadi_at_oracle.com>
> a écrit :
>
>> Hi experts!
>>
>> My name is Roman, I am currently working on JSONB RI.
>>
>> I need clarification about PropertyNamingStragegy. Should property naming
>> strategy "override" property names explicitly set by @JsonbProperty
>> annotation?
>>
>> For example, when marshalling class:
>>
>> class Pojo {
>> @JsonbProperty("updatedName")
>> String propertyWithSomeName;
>> }
>>
>> should a resulting json key name for a property, with a
>> PropertyNamingStrategy.LOWER_CASE_WITH_UNDERSCORES set globally, be
>> "updatedName" or "updated_name"?
>>
>> Thank you,
>> Roman
>>
>
>