private static String fromMap(Map<?, ?> map) throws Exception {
        String json = "{}";
        log.debug(String.format("method start Map[map:%s]", map));
        if (map != null && map.size() > 0) {
            StringBuilder sb = new StringBuilder(map.size() * 10); //假设10是一个键值对的平均长度
            sb.append("{");
            Object obj;
            for (Object key : map.keySet()) {
                obj = map.get(key);
                sb.append("\"").append(key.toString()).append("\":").append(fromObject(obj)).append(",");
            }
            sb.setCharAt(sb.length() - 1, '}');
            json = sb.toString();
        } 
        log.debug(String.format("method stop return:String[%s]", json));
        return json;
    }