@Test public void testQuery04_url_encoding_for_queryString() { Map<String, Object> map = new LinkedHashMap<String, Object>(); map.put("key#1", "value#1"); map.put("key[2", "value[2"); map.put("key]3", "value]3"); map.put("key&4", "value&4"); map.put("key=5", "value=5"); map.put("key+6", "value+6"); String actualQuery = Functions.query(map); StringBuilder expectedQuery = new StringBuilder(); expectedQuery.append("key%231=value%231"); expectedQuery.append("&").append("key%5B2=value%5B2"); expectedQuery.append("&").append("key%5D3=value%5D3"); expectedQuery.append("&").append("key%264=value%264"); expectedQuery.append("&").append("key%3D5=value%3D5"); expectedQuery.append("&").append("key%2B6=value%2B6"); assertThat(actualQuery, is(expectedQuery.toString())); }
public static String query(Object params) { if (params == null) { return ""; } Class<?> clazz = params.getClass(); if (BeanUtils.isSimpleValueType(clazz)) { return ""; } return mapToQuery(OBJECT_TO_MAP_CONVERTER.convert(params)); }
Functions { public static String query(Object params) { if (params == null) { return ""; } Class<?> clazz = params.getClass(); if (BeanUtils.isSimpleValueType(clazz)) { return ""; } return mapToQuery(OBJECT_TO_MAP_CONVERTER.convert(params)); } }
Functions { public static String query(Object params) { if (params == null) { return ""; } Class<?> clazz = params.getClass(); if (BeanUtils.isSimpleValueType(clazz)) { return ""; } return mapToQuery(OBJECT_TO_MAP_CONVERTER.convert(params)); } private  Functions(); }
Functions { public static String query(Object params) { if (params == null) { return ""; } Class<?> clazz = params.getClass(); if (BeanUtils.isSimpleValueType(clazz)) { return ""; } return mapToQuery(OBJECT_TO_MAP_CONVERTER.convert(params)); } private  Functions(); static String h(Object input); static String u(String value); static String br(String value); static String cut(String value, int length); static String link(String value); static String mapToQuery(Map<String, ?> map); @Deprecated static String mapToQuery(Map<String, ?> map,
            BeanWrapper beanWrapper); static String query(Object params); static String js(String value); static String hjs(String input); }
Functions { public static String query(Object params) { if (params == null) { return ""; } Class<?> clazz = params.getClass(); if (BeanUtils.isSimpleValueType(clazz)) { return ""; } return mapToQuery(OBJECT_TO_MAP_CONVERTER.convert(params)); } private  Functions(); static String h(Object input); static String u(String value); static String br(String value); static String cut(String value, int length); static String link(String value); static String mapToQuery(Map<String, ?> map); @Deprecated static String mapToQuery(Map<String, ?> map,
            BeanWrapper beanWrapper); static String query(Object params); static String js(String value); static String hjs(String input);  }