You can enable/disable `SerializationFeature`s using `ObjectWriter` instead of `ObjectMapper`, like so:
byte[] bytes = mapper.writer().with(SerializationFeature.WRAP_ROOT_VALUE) .writeValueAsBytes(pojo); I don't know what support Spring Boot offers for doing this. -+ Tatu +- On Mon, Mar 20, 2017 at 3:50 PM, shane lee <shanelee...@gmail.com> wrote: > Hi all, > > I have asked this question already on github: > https://github.com/FasterXML/jackson-databind/issues/1567 > > What I want is to enable this serilisation feature but only for the pojo i > have defined using @JsonRootName. Not all other pojos that i serialise. How > is that possible? > > Thanks, > Shane. > > > Spring boot version 1.4.0.RELEASE > jackson databind 2.8.1 > > -- > You received this message because you are subscribed to the Google Groups > "jackson-user" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jackson-user+unsubscr...@googlegroups.com. > To post to this group, send email to jackson-user@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "jackson-user" group. To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user+unsubscr...@googlegroups.com. To post to this group, send email to jackson-user@googlegroups.com. For more options, visit https://groups.google.com/d/optout.