When I write:
JSON.std.with(JSON.Feature.READ_JSON_ARRAYS_AS_JAVA_ARRAYS)
.arrayOfFrom(MyClass.class, stringContent);
my application crashes with a ClassCastException
:
java.lang.ClassCastException: java.lang.Object[] cannot be cast to com.example.MyClass[]
Everything works when the array carries more than one element. I have also tested with empty arrays, and I got the same exception. I am somehow reminded of #27 where arrays featured a similarly bugged behaviour, except it involved casting an ArrayList
.