Better handling of ncube types in json writer.

Left it on a test that is failing equals because it looks like Object[] isn't being handled correctly in the equals() comparison.