[json] Fix peeking so that it stops at \0