use of com.fasterxml.jackson.core.util.DefaultPrettyPrinter in project midpoint by Evolveum.
the class JsonLexicalProcessor method createJsonGenerator.
private JsonGenerator createJsonGenerator(StringWriter out) throws SchemaException {
try {
JsonFactory factory = new JsonFactory();
JsonGenerator generator = factory.createGenerator(out);
generator.setPrettyPrinter(new DefaultPrettyPrinter());
generator.setCodec(configureMapperForSerialization());
return generator;
} catch (IOException ex) {
throw new SchemaException("Schema error during serializing to JSON.", ex);
}
}
use of com.fasterxml.jackson.core.util.DefaultPrettyPrinter in project geode by apache.
the class PdxToJSON method enableDisableJSONGeneratorFeature.
private void enableDisableJSONGeneratorFeature(JsonGenerator jg) {
jg.enable(Feature.ESCAPE_NON_ASCII);
jg.disable(Feature.AUTO_CLOSE_TARGET);
jg.setPrettyPrinter(new DefaultPrettyPrinter());
if (PDXTOJJSON_UNQUOTEFIELDNAMES)
jg.disable(Feature.QUOTE_FIELD_NAMES);
}
Aggregations