Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
jsonUnescape skips a character after \uXXXX unicode sequences. #146
For instance, the following code will fail to parse, even though it is valid JSON:
The issue seems to be because jsonUnescape pops an extra character while parsing the unicode sequence, and in cases like the above, that will incorrectly drop the ". In other strings it will instead just skip a character in the output.
The while loop in jsonUnescape has a "range.popFront();" at the end of it that works for all cases except the unicode sequence, which internally pops all 5 characters itself. The logic will need some minor modification (move the trailing pop to each of the other cases explicitly or similar) to avoid this problem.