This commit is contained in:
Looly
2024-09-24 04:01:53 +08:00
parent d8a7b9b440
commit 702253aaf6

View File

@@ -197,14 +197,12 @@ public class JSONArrayTest {
@Test @Test
public void toListWithErrorTest() { public void toListWithErrorTest() {
// Assertions.assertThrows(JSONException.class, ()->{ Assertions.assertThrows(JSONException.class, ()->{
// }); final String json = "[['aaa',{'akey':'avalue','bkey':'bvalue'}]]";
final String json = "[['aaa',{'akey':'avalue','bkey':'bvalue'}]]"; final JSONArray ja = JSONUtil.parseArray(json);
final JSONArray ja = JSONUtil.parseArray(json); final Object bean = ja.toBean(new TypeReference<List<List<KeyBean>>>() {});
Console.log(bean);
final Object bean = ja.toBean(new TypeReference<List<List<KeyBean>>>() {}); });
Console.log(bean);
} }
@Test @Test