ObjectMapper objectMapper = OBJECT_MAPPER_SUPPLIER.get();
JsonGenerator jsonGenerator = new SmileFactory().createGenerator(out);
// Important: we are NOT to close the underlying stream after
// mapping, so we need to instruct generator:
jsonGenerator.disable(JsonGenerator.Feature.AUTO_CLOSE_TARGET);
// 04-Mar-2010, tatu: How about type we were given? (if any)
JavaType rootType = null;
if (genericType != null && instance != null) {
// 10-Jan-2011, tatu: as per [JACKSON-456], it's not safe to just force root