Looks like method findNamepace() in JacksonXmlAnnotationIntrospector is considering both @JsonProperty and @JacksonXmlNamespace (latter having precedence) but does not support case like so:
@JsonProperty(value="value", namespace="uri:ns1")
@JacksonXmlProperty(isAttribute=true)
public int valueDefault = 42;
in which @JacksonXmlProperty does not define namespace (that is, is left as "", empty String).
In such case it should then return namespace value of @JsonProperty instead.
Ideally in future we could simply use methods from AnnotationIntrospection -- findNameForSerialization() and findNameForDeserializaiton -- which also expose "namespace", but on short term let's handle merging better.
(note: offshoot of #628)
Looks like method
findNamepace()
inJacksonXmlAnnotationIntrospector
is considering both@JsonProperty
and@JacksonXmlNamespace
(latter having precedence) but does not support case like so:in which
@JacksonXmlProperty
does not define namespace (that is, is left as "", empty String). In such case it should then returnnamespace
value of@JsonProperty
instead.Ideally in future we could simply use methods from
AnnotationIntrospection
--findNameForSerialization()
andfindNameForDeserializaiton
-- which also expose "namespace", but on short term let's handle merging better.