def json2list(jsonstr):

    if jsonstr == "":
        value_list = []
    else:
        if jsonstr[0] == "[":
            value_list = json2py(jsonstr)
        else:
            value_list = jsonstr.split(",")
        if not isinstance(value_list, list):
            value_list = [value_list]
    return value_list

# -----------------------------------------------------------------------------
Helper for various string-wrapped functions.
dataset/ETHPy150Open sahana/eden/modules/s3db/survey.py/json2list--crossover with--dataset/ETHPy150Open AppScale/appscale/AppServer/lib/jinja2-2.6/jinja2/_markupsafe/__init__.py/_escape_argspec