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;
}
}