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();
    }
Serialize an object to a JSON String.

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