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