private JsonTransformer(JsonGenerator json, ISSTableScanner currentScanner, boolean rawTime, CFMetaData metadata) { this.json = json; this.metadata = metadata; this.currentScanner = currentScanner; this.rawTime = rawTime; DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter(); prettyPrinter.indentObjectsWith(objectIndenter); prettyPrinter.indentArraysWith(arrayIndenter); json.setPrettyPrinter(prettyPrinter); }
private JsonTransformer(JsonGenerator json, ISSTableScanner currentScanner, boolean rawTime, CFMetaData metadata) { this.json = json; this.metadata = metadata; this.currentScanner = currentScanner; this.rawTime = rawTime; DefaultPrettyPrinter prettyPrinter = new DefaultPrettyPrinter(); prettyPrinter.indentObjectsWith(objectIndenter); prettyPrinter.indentArraysWith(arrayIndenter); json.setPrettyPrinter(prettyPrinter); }
/** * Instantiates a new base lens command. */ public BaseLensCommand() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(Inclusion.NON_NULL); mapper.setSerializationInclusion(Inclusion.NON_DEFAULT); pp = new DefaultPrettyPrinter(); pp.indentObjectsWith(new Indenter() { @Override public void writeIndentation(JsonGenerator jg, int level) throws IOException { jg.writeRaw("\n"); for (int i = 0; i < level; i++) { jg.writeRaw(" "); } } @Override public boolean isInline() { return false; } }); }
/** * Instantiates a new base lens command. */ public BaseLensCommand() { mapper = new ObjectMapper(); mapper.setSerializationInclusion(Inclusion.NON_NULL); mapper.setSerializationInclusion(Inclusion.NON_DEFAULT); pp = new DefaultPrettyPrinter(); pp.indentObjectsWith(new Indenter() { @Override public void writeIndentation(JsonGenerator jg, int level) throws IOException { jg.writeRaw("\n"); for (int i = 0; i < level; i++) { jg.writeRaw(" "); } } @Override public boolean isInline() { return false; } }); }