throws Exception
  private void encodeArray(StringBuilderValue sb, ArrayValue val)  {    long length = 0;    for (Value key : val.keySet()) {      if ((! key.isLongConvertible()) || key.toLong() != length) {        encodeArrayAsObject(sb, val);        return;      }      length++;    }    sb.append('[');    length = 0;    for (Value value : ((ArrayValue)val).values()) {      if (length > 0)        sb.append(',');      jsonEncodeImpl(sb, value);      length++;    }    sb.append(']');  }