public void testScalarArrays() throws Exception {
  ObjectMapper m=new ObjectMapper();
  m.enableDefaultTyping(ObjectMapper.DefaultTyping.JAVA_LANG_OBJECT);
  Object[] input=new Object[]{"abc",new Date(1234567),null,Integer.valueOf(456)};
  String json=m.writeValueAsString(input);
  assertEquals("[\"abc\",[\"java.util.Date\",1234567],null,456]",json);
  Object[] output=m.readValue(json,Object[].class);
  assertArrayEquals(input,output);
}

public void testScalarArrays ( ) throws Exception { ObjectMapper m = new ObjectMapper ( ) ; m . enableDefaultTyping ( ObjectMapper . DefaultTyping . JAVA_LANG_OBJECT ) ; Object [ ] input = new Object [ ] { "abc" , new Date ( 1234567 ) , null , Integer . valueOf ( 456 ) } ; String json = m . writeValueAsString ( input ) ; assertEquals ( "[\"abc\",[\"java.util.Date\",1234567],null,456]" , json ) ; Object [ ] output = m . readValue ( json , Object [ ] . class ) ; assertArrayEquals ( input , output ) ; }
test for verifying that contents of " untyped " homogenous arrays are properly handled ,
