public static String toJson(Object obj) {
        return gson.toJson(obj);
    }
This method serializes the specified object into its equivalent Json representation.

@param obj obj
@return json content
inlong-agent/agent-common/src/main/java/org/apache/inlong/agent/utils/GsonUtil.java