-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Problem with @JsonIgnoreProperties
on recursive property (regression in 2.8)
#1575
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
Comments
@JsonIgnoreProperties
on recursive property (regression in 2.8.0)
Yes, I can reproduce the issue as reported (and even simplified form). For what it is worth, property need not be a |
@JsonIgnoreProperties
on recursive property (regression in 2.8.0)@JsonIgnoreProperties
on recursive property (regression in 2.8)
Turned out to be rather complicated to fix, but managed to do it. Not sure what exactly broke it, either, may have been working "accidentally". Either way, fix will be in 2.8.8 and 2.9.0 (or .pr3 if we release such). |
I am getting an exception with jackson databind version 2.8.0 and later, everything works fine with any version below 2.8.0.
Issue is, if I have a property name with an underscore and the letter after it is NOT the same as the first letter, then things blow up.
For example I have a Person class which contains a Set which has the name as "person_z" which fails.
But if I rename it to "person_p" it works.
Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: No _valueDeserializer assigned
at [Source: [ {
"name": "admin",
"person_z": [ { "name": "admin" } ] }]; line: 3, column: 41] (through reference chain: java.util.ArrayList[0]->com.example.Person["person_z"]->java.util.HashSet[0]->com.example.Person["name"])
at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:261)
at com.fasterxml.jackson.databind.DeserializationContext.reportMappingException(DeserializationContext.java:1233)
at com.fasterxml.jackson.databind.deser.impl.FailingDeserializer.deserialize(FailingDeserializer.java:27)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:101)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:276)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:140)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:277)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
at com.fasterxml.jackson.databind.deser.SettableBeanProperty.deserialize(SettableBeanProperty.java:490)
at com.fasterxml.jackson.databind.deser.impl.FieldProperty.deserializeAndSet(FieldProperty.java:101)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:276)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:140)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:277)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:249)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:26)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3789)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2871)
at com.example.TestJackson.main(TestJackson.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
The text was updated successfully, but these errors were encountered: