jsr367-experts@jsonb-spec.java.net

[jsr367-experts] PropertyNamingStrategy with customized property names

From: Roman Grigoriadi <roman.grigoriadi_at_oracle.com>
Date: Sat, 30 Jan 2016 18:04:48 +0100

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