Converts array to a json string

def _convert_dict_to_json(array):
    """ Converts array to a json string """
    return json.dumps(
        array,
        skipkeys=False,
        allow_nan=False,
        indent=None,
        separators=(",", ":"),
        sort_keys=True,
        default=lambda o: o.__dict__,
    )