public void serialize(T object, OutputStream os) throws IOException {
        JsonGenerator jsonGenerator = LoganSquare.JSON_FACTORY.createGenerator(os);
        serialize(object, jsonGenerator, true);
        jsonGenerator.close();
    }
Serialize an object to an OutputStream.

@param object The object to serialize.
@param os The OutputStream being written to.
core/src/main/java/com/bluelinelabs/logansquare/JsonMapper.java