[json] handle format_collection
This commit is contained in:
parent
7b5ab26d0f
commit
aeab3fac71
2 changed files with 17 additions and 0 deletions
|
|
@ -57,6 +57,9 @@ class JsonFormatter(IFormatter):
|
|||
def format_dict(self, item):
|
||||
self.queue.append(item)
|
||||
|
||||
def format_collection(self, collection, only):
|
||||
self.queue.append(collection.to_dict())
|
||||
|
||||
|
||||
class JsonLineFormatter(IFormatter):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue