[issue38751] Document maximum JSON depth or remove it.

2019-11-10 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Pyt

[issue38751] Document maximum JSON depth or remove it.

2019-11-10 Thread Raymond Hettinger
Raymond Hettinger 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 ra

[issue38751] Document maximum JSON depth or remove it.

2019-11-08 Thread Борис Верховский
New submission from Борис Верховский : import json foo = {} for i in range(1000): json.dumps(foo) print(i) foo = {'bar': foo} Will error at 994. At a minimum this magic number should be documented, but it would be better if the json library could handle arbitrarily nested JSON or