code: private void writeGrid(SerIterator itemIterator) throws IOException {
          output.writeArrayStart();
          output.writeArrayItemStart();
          output.writeInt(itemIterator.dimensionSize(0));
          output.writeArrayItemStart();
          output.writeInt(itemIterator.dimensionSize(1));
          while (itemIterator.hasNext()) {
              itemIterator.next();
              output.writeArrayItemStart();
              output.writeArrayStart();
              output.writeArrayItemStart();
              output.writeInt((Integer) itemIterator.key());
              output.writeArrayItemStart();
              output.writeInt((Integer) itemIterator.column());
              output.writeArrayItemStart();
              writeObject(itemIterator.valueType(), itemIterator.value(), itemIterator);
              output.writeArrayEnd();
          }
          output.writeArrayEnd();
      }
docs: write grid using sparse approach