static void serializeTensorCells(JsonGenerator generator, Tensor tensor) throws IOException {
        generator.writeArrayFieldStart(TensorReader.TENSOR_CELLS);
        for (Map.Entry<TensorAddress, Double> cell : tensor.cells().entrySet()) {
            generator.writeStartObject();
            serializeTensorAddress(generator, cell.getKey(), tensor.type());
            generator.writeNumberField(TensorReader.TENSOR_VALUE, cell.getValue());
            generator.writeEndObject();
        }
        generator.writeEndArray();
    }
@author Steinar Knutsen
@author Vegard Sjonfjell
document/src/main/java/com/yahoo/document/json/JsonSerializationHelper.java