Visibility can be changed on per-class basis using annotation @JsonAutoDetect. And to use these for third-party classes, you can use mix-in annotation approach to associate settings. Conversely you could change defaults, and override visibility for your own classes.
Going forward we could perhaps extend new feature 2.8 added, ObjectMapper. configOverride(), to allow changing visibility aspects. Currently it only supports couple of other per-class configuration settings. I'll create a feature request for that; but even if implemented, that'd take a while an only be included in 2.9. Hope this helps, -+ Tatu +- On Fri, Aug 26, 2016 at 4:55 AM, <[email protected]> wrote: > Hello > > > So I have turned globally off some mapper features. > getObjectMapper().configure(MapperFeature.AUTO_DETECT_FIELDS, > false); > getObjectMapper().configure(MapperFeature.AUTO_DETECT_GETTERS, > false); > getObjectMapper().configure(MapperFeature.AUTO_DETECT_IS_GETTERS, > false) > > So by default fields and getters won't get serialized. But now I have > problem where third party dependecy fails doing HTTP requests, because now > these third party POJO-s won't get serialized also. > > Is there such option to configure mapper features per class, so I could > turn these on for third party dependency? > > > > Thanks, > Siim > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > 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 [email protected]. To post to this group, send email to [email protected]. For more options, visit https://groups.google.com/d/optout.
