Change string buffer handling in json scanner