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

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
used to modify a json string to a python list .