Lazy objects in combination with iter() must be handled with care: fixed issue causing iter() to not return an iterator.
Renamed output.json to output._json as it resulted in ImportErrors when importing 'normal' json module.