/**
  * Set the given index with the given element, if the SQLJSON object is a JSON array.
  *
  * @param index
  * @param object
  * @return
  */
 @Override
 public void set(int index, Object object) throws SQLException {
   if (!(jsonObject instanceof List)) {
     throw new SQLException("SQLJSON object is not a list");
   } else {
     // this is a hack
     List backingList = ((ValueList) jsonObject).list();
     //noinspection unchecked
     backingList.set(index, object);
   }
 }