Jackson offers the methods:
ObjectWriter ObjectMapper.writer(FilterProvider)
ObjectWriter ObjectMapper.writer(PrettyPrinter)
ObjectWriter ObjectMapper.writerWithDefaultPrettyPrinter()
But I want to use both pretty printing and a custom FilterProvider in my writer. How do I get a writer that uses both?
You can take still configure this on the
ObjectWriterinstance returned by any of theObjectMapper.write()method:See the ObjectWriter class for more information