New submission from Борис Верховский <boris.v...@gmail.com>:

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 
have a configurable limit.

https://github.com/lovasoa/bad_json_parsers

----------
components: Library (Lib)
messages: 356276
nosy: boris
priority: normal
severity: normal
status: open
title: Document maximum JSON depth or remove it.
type: enhancement
versions: Python 3.9

_______________________________________
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