Refactor decoder input stream
authorPetri Lehtinen <petri@digip.org>
Tue, 22 Feb 2011 08:47:02 +0000 (10:47 +0200)
committerPetri Lehtinen <petri@digip.org>
Tue, 22 Feb 2011 10:07:37 +0000 (12:07 +0200)
- Add a new field position to the json_error_t structure. This is the
  position in bytes from the beginning of the input.

- Keep track of line, column and input position in the stream level.
  Previously, only line was tracked, and it was in the lexer level, so
  this info was not available for UTF-8 decoding errors.

- While at it, refactor tests so that no separate "stripped" tests are
  required. json_process is now able to strip whitespace from its
  input, and the "valid" and "invalid" test suites now use this to
  test both non-stripped and stripped input.

Closes GH-9.


No differences found