private static void encodeLabeledSubspace(String label, MixedTensor.DenseSubspace subspace, TensorType denseSubType, Cursor cursor, boolean hexForDensePart) {
        if (hexForDensePart) {
            cursor.setString(label, asHexString(subspace.cells.length,
                                                denseSubType.valueType(),
                                                i -> subspace.cells[i],
                                                i -> (float)subspace.cells[i]));
        } else {
            IndexedTensor denseSubspace = IndexedTensor.Builder.of(denseSubType, subspace.cells).build();
            var target = cursor.setArray(label);
            encodeDenseValues(denseSubspace, target);
        }
    }
Serializes the given tensor type and value into a short-form JSON format.

@deprecated use #encode(#Tensor, boolean, boolean)
vespajlib/src/main/java/com/yahoo/tensor/serialization/JsonFormat.java