Skip to content

Please provide a way to clone an ObjectMapper #28

@rzio

Description

@rzio

We need a way to clone an ObjectMapper. The user case is:
At some times we need a ObjectMapper which has a slightly different configuration that the one that we use though the system.

In Jackson 1.9.1 we did this by
ObjectMapper o1= new ObjectMapper()
.setSerializationConfig(objectMapper.getSerializationConfig()
.with(SerializationConfig.Feature.INDENT_OUTPUT));

I couldn't find a way to reproduce this in Jackson 2.

We cannot use ObjectReader/ObjectWriter for this, since we use both databinding and the TreeModel and ObjectWriter doesn't have support for TreeModel.

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