Skip to content

Unable to override writeObjectFieldValueSeparator in DefaultPrettyPrinter #199

@chuwy

Description

@chuwy

I tried to override writeObjectFieldValueSeparator method to output colon without space before it, like it described in Jackson Cookbook in "Custom Pretty Printer":

@Override
public void writeObjectFieldValueSeparator(JsonGenerator jg) throws IOException, JsonGenerationException {
    jg.writeRaw(": ");
}

And it seems it does not even called (judging by print statements).
On the other hand, this trick with MinimalPrettyPrinter works fine.

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