renamed json to jsonstream to avoid shadowing built-in module