Re: [jackson-user] jackson jax-rs providers and custom serializer and deserializer

2017-02-17 Thread Nikhil Agrawal
Thanks. I was able to solve the issue by removing the cxf-rt-rs-extension-providers.jar file from the classpath. It seems that if JsonProvider class is in classpath then jax-rs containers will use that as MessageBodyReader/Writer which means jettison will be used. By removing that from the cla

Re: [jackson-user] jackson jax-rs providers and custom serializer and deserializer

2017-02-17 Thread Nikhil Agrawal
Hi, Thanks for the reply. I tried removing the findAndRegisterModules call but even then it didn't work. What do you meant by "re-configure mapper in some other way". Could you please provide some more details? My guess is that JacksonJsonProvider is not getting used at all. How do you I know

Re: [jackson-user] Serialization of any object with parent-child relationships without outputing the ID value

2017-02-17 Thread David Hayek
> > Part that I do not yet understand is this: when encountering already > serialized Object, > how is that handled? Would you serialize it using Object Id generated > (using whatever mechanism), > but that just wasn't included in originally serialized full object? > Or replaced with somethin

[jackson-user] com.fasterxml.jackson.core.JsonParseException: Unexpected end-of-input within/between Array entries

2017-02-17 Thread vivek sharma
HI Mates - I am getting the below intermittent errors using Jackson api to serialize and to deserialize, When I give one or 2 messages in JSON Array I don't see this error but getting when JSON messages are more than 2: com.fasterxml.jackson.core.JsonParseException: Unexpected end-of-input wi

Re: [jackson-user] Serialization of any object with parent-child relationships without outputing the ID value

2017-02-17 Thread Tatu Saloranta
On Fri, Feb 17, 2017 at 12:59 PM, David Hayek wrote: > Tatu > > I am using Object Ids to avoid duplication for objects that we can't modify > and can't identify in advance that would have circular references. Without > the Object Id, for example, printing an object such as the > DefaultMutableTree

Re: [jackson-user] Serialization of any object with parent-child relationships without outputing the ID value

2017-02-17 Thread David Hayek
Tatu I am using Object Ids to avoid duplication for objects that we can't modify and can't identify in advance that would have circular references. Without the Object Id, for example, printing an object such as the *DefaultMutableTreeNode *would always result in the following exception: com.f

Re: [jackson-user] Serialization of any object with parent-child relationships without outputing the ID value

2017-02-17 Thread Tatu Saloranta
On Fri, Feb 17, 2017 at 7:57 AM, David Hayek wrote: > Tatu > > Thanks for your quick reply. For some background on what I'm trying to do, I > want to log the objects that are passed as method arguments, either during > trace logging or when an exception occurs. Right now we have very little > insi

Re: [jackson-user] jackson jax-rs providers and custom serializer and deserializer

2017-02-17 Thread Tatu Saloranta
Usually my first guess is that configured `ObjectMapper` is not being used at all. So if you can re-configure mapper in some other way (like default to indenting or something) maybe you can eliminated the possibility that this mapper is not being used? Another small thing is that `findAndRegisterM

[jackson-user] jackson-jaxrs-providers - custom serializer and deserializer are not getting used

2017-02-17 Thread Nikhil Agrawal
Hi, I want to use custom serializer and deserializer for java.util.Calendar data type. I have the following code but it seems that the serializer and deserializer are not getting included. JacksonJsonProvider jsonProvider = new JacksonJsonProvider(); ObjectMapper mapper = new Obje

[jackson-user] Inconsistency in DateDeserializer ?

2017-02-17 Thread Dam B.
Hello, I declare a custom object mapper with a DateSerializer with a custom format like this : public class CustomObjectMapper extends ObjectMapper { public CustomObjectMapper() { configure(); } private void configure() { super.configure(SerializationFeature.

[jackson-user] jackson jax-rs providers and custom serializer and deserializer

2017-02-17 Thread Nikhil Agrawal
Hi, I am trying to use jackson as jackson-jaxrs-providers. I want to provide the custom serializer and deserializer for java.util.Calendar data type. I have the following code. I have omitted few lines for the sack of brevity. JAXRSServerFactoryBean factory = new JAXRSServerFac

Re: [jackson-user] Serialization of any object with parent-child relationships without outputing the ID value

2017-02-17 Thread David Hayek
Tatu Thanks for your quick reply. For some background on what I'm trying to do, I want to log the objects that are passed as method arguments, either during trace logging or when an exception occurs. Right now we have very little insight from trace logging, other than method flow, or what happe