コード例 #1
0
 @Test(groups = {"test4j", "json"})
 public void testParseFromJSONArray() {
   String json = "['12',124,\"456\"]";
   Short[] ints = JSON.toObject(json, short[].class);
   want.array(ints).sizeEq(3).reflectionEq(new short[] {12, 124, 456});
 }
コード例 #2
0
 @Test
 public void testParseFromJSONArray() {
   String json = "['a',b,\"c\"]";
   Character[] ints = JSON.toObject(json, char[].class);
   want.array(ints).sizeEq(3).reflectionEq(new char[] {'a', 'b', 'c'});
 }