Enable using the old envrionment variable passing of settings for json_process
so that the current autoconf test suite scripts can run nicely.
json_process now takes an optional command line parameter --env which
causes it to use the old method of reading the settings from
environment variables instead of directly from the "env" file.
Also added a --strip command line option, this will be used to
run the stripped tests with CMake as well.
- 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.
json_int_t is typedef'd to long long if it's supported, or long
otherwise. There's also some supporting things, like the
JSON_INTEGER_FORMAT macro that expands to the printf() conversion
specifier that corresponds to json_int_t's actual type.
This is a backwards incompatible change.