of = open('test.json', 'w')
of.write(
    """[ "hello" ] { "goodbye" : 1 } 1 2 {
} 2
9 78
 4 5 { "animals" : [ "dog" , "lots of mice" ,
 "cat" ] }
"""
    )
of.close()
f = open('test.json', 'r')
for o in streamiterload(f.readlines()):
    print(o)
f.close()
How I can I lazily read multiple JSON objects from a file/stream in Python?