import json


def convert_rgb_array_to_text(rgb_array):
    """
    This function converts a numpy array to a (nested) Python list
    and then converts the list to a string by using the function named 'dumps' from the 'json' module.
    (https://docs.python.org/3/library/json.html#json.dumps).
    :param rgb_array: an RGB image converted into a numpy array (the array has following shape(y, x, 3))
    :type rgb_array: numpy.ndarray (https://docs.scipy.org/doc/numpy/reference/generated/numpy.ndarray.html)
    :return: a (nested) Python list, which previously was a numpy array, converted to a string
    :rtype: string - str
    """
    return json.dumps(rgb_array.tolist())