hjiang/jsonxx — pull request #30 by iauns (2014-03-02 06:38:06+00:00)
Title: Implement rollback for number parsing.

The stream number parser was parsing the initial two letters of a binary value of 'false' as hexadecimal input. After failing number parsing on 'l', the stream was not rolled back and subsequent parsing failed.

This occurs on Mac OS X using Apple LLVM version 5.0 (Apple Clang 5.0).

The only thing that concerns me about this new code is that it won't work for streams that don't implement seekg. In my case, stringstream, it is implemented. I've tested it on a number of json files on Mac OS X with libc++, but the test json files are by no means not exhaustive.