write an object streamer that emits key/value pairs or array elements from any given json entity