Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

There is nothing here specific to JSON.  It is Python's normal (and documented) 
limit on recursion. 

If needed, you can change the limit to as large as needed:

    import json
    import sys
    sys.setrecursionlimit(50_000)

    foo = {}

    for i in range(10_000):
        foo = {'bar': foo}
    s = json.dumps(foo)
    print(len(s))

----------
nosy: +rhettinger

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue38751>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to