Commit 7517f08e by Zachary Voase

Loosened the restriction on serialization of iterables.

parent 1913e454
......@@ -106,7 +106,7 @@ def jsonpipe(obj, pathsep='/', path=()):
elif isinstance(obj, dict):
yield output('{}')
iterator = obj.iteritems()
elif isinstance(obj, (list, tuple)):
elif hasattr(obj, '__iter__'):
yield output('[]')
iterator = enumerate(obj)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment