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

2018-04-16 Thread Tatu Saloranta
On Mon, Apr 16, 2018 at 11:07 AM, Marcel Overdijk wrote: > 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 - may

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 simpl

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

2018-04-16 Thread Tatu Saloranta
On Sun, Apr 15, 2018 at 10:01 AM, Marcel Overdijk wrote: > Hi, > > When I have a custom `JsonSerializer` defined via @JsonSerialize does it it > create only 1 instance of the `JsonSerializer` or multiple? > > > @JsonSerialize(using = JsonapiDocument.JsonapiDocumentSerializer::class) > class Jsonap

[jackson-user] Are custom serializers cached?

2018-04-16 Thread Marcel Overdijk
Hi, When I have a custom `JsonSerializer` defined via @JsonSerialize does it it create only 1 instance of the `JsonSerializer` or multiple? @JsonSerialize(using = JsonapiDocument.JsonapiDocumentSerializer::class) class JsonapiDocument I need to introspect the class to be serialized and want