@Override public PrettyPrinter getPrettyPrinter() { return delegate.getPrettyPrinter(); }
@Override public PrettyPrinter getPrettyPrinter() { return delegate.getPrettyPrinter(); }
/** * Method that can be used to serialize any Java value as * JSON output, using provided {@link JsonGenerator}. */ @Override public void writeValue(JsonGenerator g, Object value) throws IOException, JsonGenerationException, JsonMappingException { SerializationConfig config = getSerializationConfig(); /* 12-May-2015/2.6, tatu: Looks like we do NOT want to call the usual * 'config.initialize(g)` here, since it is assumed that generator * has been configured by caller. But for some reason we don't * trust indentation settings... */ // 10-Aug-2012, tatu: as per [Issue#12], must handle indentation: if (config.isEnabled(SerializationFeature.INDENT_OUTPUT)) { if (g.getPrettyPrinter() == null) { g.setPrettyPrinter(config.constructDefaultPrettyPrinter()); } } if (config.isEnabled(SerializationFeature.CLOSE_CLOSEABLE) && (value instanceof Closeable)) { _writeCloseableValue(g, value, config); } else { _serializerProvider(config).serializeValue(g, value); if (config.isEnabled(SerializationFeature.FLUSH_AFTER_WRITE_VALUE)) { g.flush(); } } }
if (g.getPrettyPrinter() == null) { PrettyPrinter pp = constructDefaultPrettyPrinter(); if (pp != null) {
@Override public PrettyPrinter getPrettyPrinter() { return delegate.getPrettyPrinter(); }
@Override public PrettyPrinter getPrettyPrinter() { return delegate.getPrettyPrinter(); }
@Override public PrettyPrinter getPrettyPrinter() { return delegate.getPrettyPrinter(); }
public boolean getPrettyPrinting() { return jsonGenerator.getPrettyPrinter() != null; }
@Override public PrettyPrinter getPrettyPrinter() { return delegate.getPrettyPrinter(); }
if (jgen.getPrettyPrinter() != null && action instanceof ActionDoc) {// insertion
/** * Method that can be used to serialize any Java value as * JSON output, using provided {@link JsonGenerator}. */ @Override public void writeValue(JsonGenerator g, Object value) throws IOException, JsonGenerationException, JsonMappingException { SerializationConfig config = getSerializationConfig(); /* 12-May-2015/2.6, tatu: Looks like we do NOT want to call the usual * 'config.initialize(g)` here, since it is assumed that generator * has been configured by caller. But for some reason we don't * trust indentation settings... */ // 10-Aug-2012, tatu: as per [Issue#12], must handle indentation: if (config.isEnabled(SerializationFeature.INDENT_OUTPUT)) { if (g.getPrettyPrinter() == null) { g.setPrettyPrinter(config.constructDefaultPrettyPrinter()); } } if (config.isEnabled(SerializationFeature.CLOSE_CLOSEABLE) && (value instanceof Closeable)) { _writeCloseableValue(g, value, config); } else { _serializerProvider(config).serializeValue(g, value); if (config.isEnabled(SerializationFeature.FLUSH_AFTER_WRITE_VALUE)) { g.flush(); } } }
/** * Method that can be used to serialize any Java value as * JSON output, using provided {@link JsonGenerator}. */ @Override public void writeValue(JsonGenerator g, Object value) throws IOException, JsonGenerationException, JsonMappingException { SerializationConfig config = getSerializationConfig(); /* 12-May-2015/2.6, tatu: Looks like we do NOT want to call the usual * 'config.initialize(g)` here, since it is assumed that generator * has been configured by caller. But for some reason we don't * trust indentation settings... */ // 10-Aug-2012, tatu: as per [Issue#12], must handle indentation: if (config.isEnabled(SerializationFeature.INDENT_OUTPUT)) { if (g.getPrettyPrinter() == null) { g.setPrettyPrinter(config.constructDefaultPrettyPrinter()); } } if (config.isEnabled(SerializationFeature.CLOSE_CLOSEABLE) && (value instanceof Closeable)) { _writeCloseableValue(g, value, config); } else { _serializerProvider(config).serializeValue(g, value); if (config.isEnabled(SerializationFeature.FLUSH_AFTER_WRITE_VALUE)) { g.flush(); } } }
if (g.getPrettyPrinter() == null) { PrettyPrinter pp = constructDefaultPrettyPrinter(); if (pp != null) {
if (g.getPrettyPrinter() == null) { PrettyPrinter pp = constructDefaultPrettyPrinter(); if (pp != null) {