use of com.fasterxml.jackson.core.util.Separators in project CzechIdMng by bcvsolutions.
the class AbstractReleaseManager method getPrettyPrinter.
/**
* IdM configured json {@link PrettyPrinter} - the same format as npm is needed.
*
* @return configured printer
* @since 10.3.0
*/
protected PrettyPrinter getPrettyPrinter() {
if (prettyPrinter == null) {
//
// Prevent to append leading value space.
DefaultPrettyPrinter defaultPrettyPrinter = new DefaultPrettyPrinter() {
private static final long serialVersionUID = 1L;
/**
* Prevent to append leading value space.
*/
@Override
public DefaultPrettyPrinter withSeparators(Separators separators) {
_separators = separators;
_objectFieldValueSeparatorWithSpaces = separators.getObjectFieldValueSeparator() + " ";
return this;
}
};
//
// array value on new line
defaultPrettyPrinter.indentArraysWith(DefaultIndenter.SYSTEM_LINEFEED_INSTANCE);
//
prettyPrinter = defaultPrettyPrinter;
}
//
return prettyPrinter;
}
Aggregations