question: @ SuppressWarnings ( "rawtypes" ) public static Map < String , String > parseKeyAndValueToMap ( JSONObject sourceObj ) { if ( sourceObj == null ) { return null ; } Map < String , String > keyAndValueMap = new HashMap < String , String > ( ) ; for ( Iterator iter = sourceObj . keys ( ) ; iter . hasNext ( ) ; ) { String key = ( String ) iter . next ( ) ; MapUtils . putMapNotEmptyKey ( keyAndValueMap , key , getString ( sourceObj , key , "" ) ) ; } return keyAndValueMap ; }
target:  parse key-value pairs to map. ignore empty key, if getValue exception, put empty value