Skip to content

Would like to be able to define a custom PrettyPrint class and have it used as the default by my ObjectMapper class. #689

@derknorton

Description

@derknorton

I have a custom MyObjectMapper class and would like to have it use a custom MyPrettyPrint class as the default pretty printer everywhere one is used by the object mapper class. Ideally, I would like to be able to do something as simple as this:

public class MyObjectMapper extends ObjectMapper {

    @Override
    protected PrettyPrinter _defaultPrettyPrinter() {
        return new MyPrettyPrinter();
    }

}

Currently, the ObjectMapper class generates new DefaultPrettyPrinter instances directly which limits the usefulness of overriding the _defaultPrettyPrinter method.

This enhancement request is a follow on to the discussion listed here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions