code: public String serialize(T object) throws IOException {
          StringWriter sw = new StringWriter();
          JsonGenerator jsonGenerator = LoganSquare.JSON_FACTORY.createGenerator(sw);
          serialize(object, jsonGenerator, true);
          jsonGenerator.close();
          return sw.toString();
      }
docs: Serialize an object to a JSON String.
  
  @param object The object to serialize.