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

2018-12-20 Thread Tatu Saloranta
On Thu, Dec 20, 2018 at 1:51 PM 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 > "this" object > > do you want the example checked into github for quick run? But this "ab

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 > "this" object > > do you want the example checked int

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

2018-12-20 Thread matt Smith
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 "this" object do you want the example checked into github for quick run? On Thursday, December 20, 2018 at 1:44:45 PM UTC-8, Tatu Saloranta wrote: >

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

2018-12-20 Thread Tatu Saloranta
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? Almost right, with one incorrect one: > > if (items.isEmpty()) { > jgen.writeStartObj

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

2018-12-20 Thread matt Smith
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? if (items.isEmpty()) { jgen.writeStartObject(); jgen.writeFieldName(id); jgen.writeStartArray();