def make_table(self, obj):
        if not isinstance(obj, ListType):
            raise ModuleError(self, "JSON file is not a list")
        iterator = iter(obj)
        try:
            first = next(iterator)
        except __HOLE__:
            raise ModuleError(self, "No element in JSON list")
        count = 1
        if isinstance(first, ListType):
            keys = None
            columns = [[] for i in xrange(len(first))]
            self.add_list(columns, None, first)
            for value in iterator:
                self.add_list(columns, None, value)
                count += 1
        elif isinstance(first, dict):
            keys = first.keys()
            key_set = set(keys)
            columns = [[] for i in xrange(len(keys))]
            self.add_dict(columns, keys, key_set, None, first)
            for value in iterator:
                self.add_dict(columns, keys, key_set, None, value)
                count += 1
        else:
            raise ModuleError(self, "Values should be lists or objects")

        return TableObject(columns, count, keys)
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/packages/tabledata/read/convert.py/BaseListToTable.make_table