safer json parsing for unicode