Re: [jackson-user] Are custom serializers cached?

2018-04-16 Thread Marcel Overdijk
I don’t *require* only 1 instance but want to avoid that many are created as I do need to do some introspection if classes and want to cache that information. It is only an annotation in class level so that should be fine, or - maybe to be sure - I could simply register the serializer via a

Re: [jackson-user] Access objectMapper from custom JsonSerializer to call valueToTree

2018-04-16 Thread Marcel Overdijk
Thanks Tatu! Another option I was thinking of was 1) creating the object mapper 2) creating the serializer (and provide the created objectmapper to the serializer e.g. via the serializers constructor) 3) create a module and register the serializer 4) register the module with the objectmapper