@Test public void testQuery5_NestedFields() { Person p1 = new Person(); p1.setName("山田"); p1.setAge(20); p1.setDate(new LocalDate(2001, 1, 1).toDate()); Person p2 = new Person(); p2.setName("鈴木"); p2.setAge(30); p2.setDate(new LocalDate(1991, 1, 1).toDate()); MeetingRegisterForm form = new MeetingRegisterForm(); form.setMeetingId(10); form.setParticipants(Arrays.asList(p1, p2)); String q = Functions.query(form); assertThat(q, is("meetingId=10" + "&participants%5B0%5D.age=20" + "&participants%5B0%5D.date=2001-01-01" + "&_participants%5B0%5D.list=" + "&participants%5B0%5D.name=%E5%B1%B1%E7%94%B0" + "&participants%5B1%5D.age=30" + "&participants%5B1%5D.date=1991-01-01" + "&_participants%5B1%5D.list=" + "&participants%5B1%5D.name=%E9%88%B4%E6%9C%A8")); }
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);  }