'Convert fields and filters from strings to list, dicts'

def parse_args(self):

    if isinstance(self.fields, basestring):
        if (self.fields == u'*'):
            self.fields = [u'*']
        else:
            try:
                self.fields = json.loads(self.fields)
            except ValueError:
                self.fields = [f.strip() for f in self.fields.split(u',')]
    for filter_name in [u'filters', u'or_filters']:
        filters = getattr(self, filter_name)
        if isinstance(filters, basestring):
            filters = json.loads(filters)
        if isinstance(filters, dict):
            fdict = filters
            filters = []
            for (key, value) in iteritems(fdict):
                filters.append(make_filter_tuple(self.doctype, key, value))
        setattr(self, filter_name, filters)
