use of org.codehaus.jackson.impl.WriterBasedGenerator in project databus by linkedin.
the class AbstractRequestProcesser method createJsonGenerator.
protected JsonGenerator createJsonGenerator(ObjectCodec codec, Writer writer, boolean prettyPrint) {
IOContext ioCtx = new IOContext(new BufferRecycler(), null, true);
WriterBasedGenerator result = new WriterBasedGenerator(ioCtx, 0, codec, writer);
result.configure(Feature.QUOTE_FIELD_NAMES, true);
if (prettyPrint)
result.useDefaultPrettyPrinter();
return result;
}
Aggregations