Thank you for your response. However, are you sure you are referencing the problem described above <https://groups.google.com/forum/#!searchin/jackson-user/jsonidentityinfo%7Csort:date/jackson-user/Gedw91JZiqw/cCLLtlgaBwAJ> ?
If you actually are referencing to the post, I don't understand your reply. I do store an instance of the default serializer in my custom serializer. My actual problem is the NPE during the inside job of @JsonIdentityInfo. More precisely the method com.fasterxml.jackson.databind.ser.impl.WritableObjectId.writeAsField causing the NPE when trying to access a null serializer. How can I pass my default serializer to this class ? Le mardi 21 mai 2019 20:57:04 UTC+2, Tatu Saloranta a écrit : > > On Tue, May 21, 2019 at 11:20 AM undefined <[email protected] > <javascript:>> wrote: > >> Hello from the future ! >> >> I've ran into this issue but I don't understand what you guys meant by >> "Delegating to the default serializer" ? >> > > That would refer to your custom serializer keeping a reference to the > "default serializer", one that you can get when constructing replacement > with `BeanSerializerModifier`, and then calling that instance from > `serialize()` and `serializeWithType()` to do the actual work (either > always, or just in some specific cases). > > Sometimes you can alternatively access "default" serializer dynamically > from `serialize()` (using `SerializerProvider` which has methods for > finding serializers): this works if type you use to find serializer is > different from the type you registered custom serializer with, or if custom > serializer was found from annotation (`@JsonSerialize(using = ...)`). > > -+ Tatu +- > > >> >> Thanks in advance, >> Yohan >> >> -- >> You received this message because you are subscribed to the Google Groups >> "jackson-user" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jackson-user/a0b02f70-8256-414c-834f-60fcbce1fda6%40googlegroups.com >> >> <https://groups.google.com/d/msgid/jackson-user/a0b02f70-8256-414c-834f-60fcbce1fda6%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/34a1f1f2-62fe-46bd-b208-8840f8035a5e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
