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

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

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 O

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

2018-04-16 Thread Tatu Saloranta
On Sun, Apr 15, 2018 at 11:01 AM, Marcel Overdijk wrote: > Hi, > > Is it possible to access the `objectMapper` from a custom `JsonSerializer`? > > Imagine a serializer like: > > > class JsonapiDocumentSerializer : > StdSerializer(JsonapiDocument::class.java) { > > @Throws(IOException::

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

2018-04-16 Thread Marcel Overdijk
Hi, Is it possible to access the `objectMapper` from a custom `JsonSerializer`? Imagine a serializer like: class JsonapiDocumentSerializer : StdSerializer( JsonapiDocument::class.java) { @Throws(IOException::class) override fun serialize(jsonapiDocument: JsonapiDocument, js