import json import sys d = dict.fromkeys(range(10)) for chunk in json.JSONEncoder().iterencode(d): print(chunk) # print each chunk on a newline for demonstration
Standard input is empty
{
"0"
:
null
,
"1"
:
null
,
"2"
:
null
,
"3"
:
null
,
"4"
:
null
,
"5"
:
null
,
"6"
:
null
,
"7"
:
null
,
"8"
:
null
,
"9"
:
null
}