diff --git a/jpndlpy/response.py b/jpndlpy/response.py index deae18f..9ec6ca0 100644 --- a/jpndlpy/response.py +++ b/jpndlpy/response.py @@ -67,7 +67,12 @@ def serialize(self): """ if 'item' in root: items = root['item'] - self.extract_items(items) + itemlist = [] + if type(items) is dict: + itemlist.append(items) + else: + itemlist = items + self.extract_items(itemlist) def xml_to_dict(self): """ xml to dict """