Fix and refactor JsonStream
Add more specs for json stream