private static void serializeTensorAddress(JsonGenerator generator, TensorAddress address, TensorType type) throws IOException {
        generator.writeObjectFieldStart(TensorReader.TENSOR_ADDRESS);
        for (int i = 0; i < type.dimensions().size(); i++)
            generator.writeStringField(type.dimensions().get(i).name(), address.label(i));
        generator.writeEndObject();
    }
@author Steinar Knutsen
@author Vegard Sjonfjell
document/src/main/java/com/yahoo/document/json/JsonSerializationHelper.java