json parser - fix for unreadable stream