More about my bonus question -- this would be a good reason for the JSON
deserializer to be able to create Java arrays, not just ArrayLists. That's
because I can say Foo[].class, but I can't say ArrayList<Foo>.class. And
unfortunately, if I try Foo[].class, Pivot reports this runtime error:
java.lang.RuntimeException: java.lang.InstantiationException:
[Lcom.fxpal.myunity.Foo;
which is consistent with the earlier errors.
I notice that GSon <http://code.google.com/p/google-gson/>claims to be able
to deserialize to a Java array. They also have a kludgy
workaround<http://google-gson.googlecode.com/svn/tags/1.1.1/docs/javadocs/com/google/gson/reflect/TypeToken.html>for
specifying the "class" of an ArrayList<>. The kludge doesn't work in
Pivot, though (at least not in the most naive way, of including their
library and using their syntax).