Example usage for javax.json.stream JsonGenerator PRETTY_PRINTING

List of usage examples for javax.json.stream JsonGenerator PRETTY_PRINTING

Introduction

In this page you can find the example usage for javax.json.stream JsonGenerator PRETTY_PRINTING.

Prototype

String PRETTY_PRINTING

To view the source code for javax.json.stream JsonGenerator PRETTY_PRINTING.

Click Source Link

Document

Configuration property to generate JSON prettily.

Usage

From source file:org.fuin.esc.eshttp.AbstractESHttpMarshallerTest.java

protected final JsonWriter createWriter(final Writer writer) {
    final Map<String, Boolean> config = new HashMap<>();
    config.put(JsonGenerator.PRETTY_PRINTING, true);
    return Json.createWriterFactory(config).createWriter(writer);
}

From source file:org.jboss.set.aphrodite.stream.services.json.JsonStreamService.java

private static Map<String, Boolean> buildConfig() {
    final Map<String, Boolean> config = new HashMap<String, Boolean>();
    config.put(JsonGenerator.PRETTY_PRINTING, true);
    return config;
}