code: public void serialize(T object, OutputStream os) throws IOException {
          JsonGenerator jsonGenerator = LoganSquare.JSON_FACTORY.createGenerator(os);
          serialize(object, jsonGenerator, true);
          jsonGenerator.close();
      }
docs: Serialize an object to an OutputStream.
  
  @param object The object to serialize.
  @param os The OutputStream being written to.