慕哥9229398
private static void each(Map m){ Iterator it = m.entrySet().iterator(); while (it.hasNext()) { Map.Entry entry = (Entry) it.next(); Object value = entry.getValue(); if(value == null) continue; if(value instanceof List){ System.err.println(1); Iterator lit = ((JSONArray) value).iterator(); while (lit.hasNext()) { Object lvalue = lit.next(); each((Map) lvalue); } }else if(value instanceof Map){ each((Map) value); }else if ((value instanceof net.sf.json.JSONNull)){ entry.setValue(null); } } }