Re: [jackson-user] class level JsonSerializable vs Method level

2019-01-02 Thread matt Smith
onday, December 24, 2018 at 4:56:27 PM UTC-8, Tatu Saloranta wrote: > > On Fri, Dec 21, 2018 at 2:30 PM matt Smith > wrote: > > > > In the above case, I called > `mapper.writeValueAsString(wrapper.getFoo());` > > > > I changed to the following (moved to annotat

Re: [jackson-user] class level JsonSerializable vs Method level

2018-12-21 Thread matt Smith
d setFoo(Map foo) { this.foo = foo; } } On Friday, December 21, 2018 at 1:52:41 PM UTC-8, matt Smith wrote: > > even moving annotation to the field did not work. > Note I have annotated class ItemRow class which ofcourse i can't since it > is part of legacy code. > > O

Re: [jackson-user] class level JsonSerializable vs Method level

2018-12-21 Thread matt Smith
even moving annotation to the field did not work. Note I have annotated class ItemRow class which ofcourse i can't since it is part of legacy code. On Friday, December 21, 2018 at 12:49:21 PM UTC-8, Tatu Saloranta wrote: > > On Fri, Dec 21, 2018 at 12:06 AM matt Smith > wrote:

Re: [jackson-user] class level JsonSerializable vs Method level

2018-12-21 Thread matt Smith
tUsing = ItemRowSerializer.class) public Map getFoo() { return foo; } public void setFoo(Map foo) { this.foo = foo; } } On Thursday, December 20, 2018 at 1:25:59 PM UTC-8, Tatu Saloranta wrote: > > On Thu, Dec 20, 2018 at 11:22 AM matt Smith > wrote: > > >

Re: [jackson-user] Re: JsonGenerationException with custom serializers for nested object

2018-12-20 Thread matt Smith
is that clear Tatu? On Thursday, December 20, 2018 at 1:51:04 PM UTC-8, matt Smith wrote: > > I am serializing `i` which would be "abc" : ["item1", "item2", item3"]. > `i` is object here and I have defined in same serializer how to serialize > &q

Re: [jackson-user] Re: JsonGenerationException with custom serializers for nested object

2018-12-20 Thread matt Smith
018 at 1:44:45 PM UTC-8, Tatu Saloranta wrote: > > On Thu, Dec 20, 2018 at 1:28 PM matt Smith > wrote: > > > > I added as comments beside each line in the else block below. that is > what I expect it to work. is my expectation in any of those lines? >

[jackson-user] Re: JsonGenerationException with custom serializers for nested object

2018-12-20 Thread matt Smith
uot;abc" :["item1","item2", "item2"] jgen.writeEndObject(); // "}" On Thursday, December 20, 2018 at 11:32:55 AM UTC-8, matt Smith wrote: > > here is the class that I want to serialize. > > > public class ItemRow { > >

[jackson-user] JsonGenerationException with custom serializers for nested object

2018-12-20 Thread matt Smith
here is the class that I want to serialize. public class ItemRow { private String id; private List items; } There are two variations that are allowed. `ItemRow, ItemRow`. In the latter case, it will be nested. eg: ItemRow item1 = new ItemRow("a

[jackson-user] class level JsonSerializable vs Method level

2018-12-20 Thread matt Smith
I encountered a case where class level JsonSerializable annotation does not require registration with Simple Module but method level does . Here is the example I trie

[jackson-user] Re: Recursive serializers and deserializers using jackson is not working as expected

2018-12-19 Thread matt Smith
Here is update to my original post. ignore the above though for most part they are the same. copying and pasting from SO is having formatting issues. so I have to delete couple of my posts above.. I want to serialize/deserialize Record object that has recursive references. The POJO itself cann