Re: [jackson-user] Safe deserialization

2018-10-10 Thread Michael Rogers
Hi Tatu, Thanks for your reply (and sorry for the duplicate posts). We don't need to do anything complex, so I'd just like to confirm whether the following things are safe: 1. Create a new ObjectMapper without calling enableDefaultTyping(). Use readTree(String) to parse a JsonNode from an untrus

Re: [jackson-user] Safe deserialization

2018-10-10 Thread Tatu Saloranta
On Wed, Oct 10, 2018 at 9:32 AM Michael Rogers wrote: > > Hi Tatu, > > Thanks for your reply (and sorry for the duplicate posts). > > We don't need to do anything complex, so I'd just like to confirm > whether the following things are safe: > > 1. Create a new ObjectMapper without calling enableDe

Re: [jackson-user] Multiple Mixins in one class?

2018-10-10 Thread Tatu Saloranta
On Tue, Oct 9, 2018 at 5:13 PM Ygor Castor wrote: > > Hello, i'm having a problem with a scenario, i've created the following Mixin > that is responsible to append a property in every object passed through the > object mapper: > > @JsonAppend( > prepend = true, > props = { > @Jso

Re: [jackson-user] The correct way to serialize / deserialize a Map to / from XML

2018-10-10 Thread Tatu Saloranta
On Fri, Sep 28, 2018 at 6:34 AM Tristan Lins wrote: > > Unfortunately I can not use POJOs because the data structure is completely > defined by the user. > > And a custom map deserializer is unfortunately difficult to implement because > the standard MapSerializer is not extendable. > Too many p

Re: [jackson-user] Why @class value is required in my JSON String

2018-10-10 Thread Tatu Saloranta
What is likely happening is that your type has `@JsonTypeInfo` annotation which enables polymorphic handling (and if not declared on POJO, maybe via mix-in annotations?), and for that some type of type id is absolutely required. Question, then, is why POJO type has that annotation. Alternative poss

Re: [jackson-user] Re: Custom output format with JSON Schema Module

2018-10-10 Thread Tatu Saloranta
On Wed, Sep 12, 2018 at 11:46 PM 'Gunnar Morling' via jackson-user wrote: > > This got stuck in the moderation queue for a while, in between I've found a > solution. > > For those interested, I'm using custom extensions of IntegerSchema etc. > (exposed via a custom JsonSchemaFactory) which provi

Re: [jackson-user] How does Jackson deserialize a property of a generic collection?

2018-10-10 Thread Tatu Saloranta
On Wed, Sep 12, 2018 at 10:03 PM jeff walker wrote: > > Say I have bean classes defined thus: > > public class Top { > public List bottoms; > } > > public class Bottom { > public String foo; > } > > And serialized form: > > { > "bottoms" = [ {"foo" = "1"}, {"foo" = "2"} ] > } > > > The Objec