/** * 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; } }); }
public void indentArraysWith(Indenter paramIndenter) { if (paramIndenter == null) paramIndenter = new NopIndenter(); this._arrayIndenter = paramIndenter; }
public void indentObjectsWith(Indenter paramIndenter) { if (paramIndenter == null) paramIndenter = new NopIndenter(); this._objectIndenter = paramIndenter; }