lishunli / nutz

Automatically exported from code.google.com/p/nutz
0 stars 0 forks source link

json: 字段类型为 Map<String, List<String>> 会抛错 #164

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
public static class TFAMWLV {
    Map<String, List<String>> map;
}

---------------------------------
String str = "{map:{a:['A1','A2'],b:['B1','B2']}}";
TFAMWLV obj = Json.fromJson(TFAMWLV.class, str);
assertEquals("B2", obj.map.get("b").get(1));

Original issue reported on code.google.com by zozoh...@gmail.com on 23 Apr 2010 at 8:19

GoogleCodeExporter commented 9 years ago
fix in r1123
Add JUnit: JsonTest.test_field_as_map_with_list_value

Original comment by zozoh...@gmail.com on 23 Apr 2010 at 8:19

GoogleCodeExporter commented 9 years ago

Original comment by wendal1985@gmail.com on 13 May 2010 at 11:14

GoogleCodeExporter commented 9 years ago

Original comment by zozoh...@gmail.com on 14 May 2010 at 10:41