-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Type id not exposed for JsonTypeInfo.As.EXTERNAL_PROPERTY
even when visible
set to true
#1288
Comments
Did you check the javadocs? If so, wouldn't do what you ask? If not, why? |
visible does not work with external_property |
with pleasure. Give me some time to try that (going back home for the moment) |
Please have a look at this failing test (I have cloned HEAD today) : |
@libetl thank you for reproduction. I hope to have a look at it soon. |
I found out that this issue is closely linked to the builder deserialization. |
NOW, I know. |
#1288 applying JACKSON-831 on the BuilderBasedDeserializer
JsonTypeInfo.As.EXTERNAL_PROPERTY
even when visible
set to true
Jackson : 2.8.0.rc2
Hello,
I have these following jsons to deserialize, with a type property ("form_of_payment") located outside a polymorphic class ("payment_details") :
I have to use the
@JsonTypeInfo
annotation on the PaymentDetails class, to inform Jackson that there are several kinds of PaymentDetails.The include must be a
include = JsonTypeInfo.As.EXTERNAL_PROPERTY
.Once the TypeResolver has done his job, the JsonTypeInfo is removed from the feed, which annoys me a lot (the "form_of_payment" also must be read for business purposes). If it is an
EXTERNAL_PROPERTY
, there is no way to restore it (it works withPROPERTY
, but the JsonTypeInfo must be inside the same object)Can you add a spare visibility property to the
@JsonTypeInfo
to find it in the parent object ?Here is a link to where it happens : https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/jsontype/impl/AsArrayTypeDeserializer.java#L99
Thanks.
(I have seen the #408 issue BTW)
The text was updated successfully, but these errors were encountered: