- Apr 21, 2011
-
-
Petri Lehtinen authored
-
- Apr 05, 2011
-
-
Jim Meyering authored
Closes GH-20.
-
- Mar 31, 2011
-
-
Petri Lehtinen authored
-
Petri Lehtinen authored
Replace them with jsonp_malloc() and jsonp_free() to support the custom memory allocation.
-
- Mar 30, 2011
-
-
Petri Lehtinen authored
The keys which are stored temporarily to a hashtable to make sure that all object keys are unpacked, were hashed with the object key hashing function. It is meant to compute hashes for object_key_t values, and it works incorrectly for plain strings. Fixed by introducing suitable functions for hashing and comparing strings for string-keyed hashtables.
-
- Mar 27, 2011
-
-
Petri Lehtinen authored
-
Petri Lehtinen authored
* Use "printf" instead of "echo -n" as it's more portable * Treat a test as skipped if it exits with exit status of 77 * Skip the check_exports test if "nm -D" doesn't work
-
- Mar 21, 2011
-
-
Petri Lehtinen authored
Closes GH-17.
-
Petri Lehtinen authored
Return 0 as documented if the argument is not a JSON object. Closes GH-18.
-
Petri Lehtinen authored
va_copy() is a C99 feature. In C89 implementations, it's sometimes available as __va_copy(). If not, memcpy() should do the trick.
-
- Mar 11, 2011
-
-
Petri Lehtinen authored
While at it, add -Wdeclaration-after-statement to AM_CFLAGS to catch these in the future.
-
Petri Lehtinen authored
Closes GH-16.
-
Petri Lehtinen authored
It seems that the only way to do this is to use the dvi make target, as it's built in make distcheck after running configure.
-
- Mar 01, 2011
-
-
Petri Lehtinen authored
-
- Feb 28, 2011
-
-
Petri Lehtinen authored
-
Petri Lehtinen authored
-
- Feb 26, 2011
-
-
Petri Lehtinen authored
-
Petri Lehtinen authored
-
Petri Lehtinen authored
-
- Feb 25, 2011
-
-
Petri Lehtinen authored
- Capitalize section titles correctly - Rename "Building on Windows" to "Building on non-Unix systems" and tweak the text accordingly. - Remove the "Installing Prebuilt Binaries" section. This info is better in the web instead, as it may change. - Mention that Sphinx 1.0 or newer is required.
-
Petri Lehtinen authored
-
- Feb 23, 2011
-
-
Petri Lehtinen authored
Wow, lots of stuff. And it's been a long while after the last release.
-
Petri Lehtinen authored
Closes GH-12.
-
- Feb 22, 2011
-
-
Petri Lehtinen authored
json_error_t is used in the decoder and in the pack and unpack API's, so it's better to have a separate section for it.
-
Petri Lehtinen authored
It's more helpful to see "...bar/baz.json" instead of "/long/path/to".
-
Petri Lehtinen authored
- 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.
-
- Feb 19, 2011
-
-
Petri Lehtinen authored
-
- Feb 17, 2011
-
-
Petri Lehtinen authored
Thanks to Basile Starynkevitch for the suggestion and initial patch. Thanks to Jonathan Landis and Deron Meranda for showing how this can be utilized for implementing secure memory operations.
-
- Feb 04, 2011
-
-
Graeme Smecher authored
Functions taking va_args are munged to receive arguments of type '__va_list_tag *'. This patch uses va_copy to coerce them to the expected type so we don't get compiler errors. Tested on x86_64, both 32-bit and 64-bit compiles. Reported-By:Basile Starynkevitch <basile@starynkevitch.net>
-
- Jan 30, 2011
-
-
Petri Lehtinen authored
-
Petri Lehtinen authored
Now, by default, unpacking doesn't check that all array and object items are accessed. The check can be enabled globally by using the JSON_STRICT flag (formerly JSON_UNPACK_ONLY), or on a per-value basis by using the new '!' format character. The '*' format character is still available to disable the global check on a per-value basis.
-
- Jan 26, 2011
-
-
Petri Lehtinen authored
The "haiku" theme doesn't show chapter contents in sidebar.
-
Petri Lehtinen authored
-
Petri Lehtinen authored
-
Petri Lehtinen authored
-
Petri Lehtinen authored
Give the type name instead of its enum index in the error message when an unexpected value is encountered while unpacking.
-
- Jan 25, 2011
-
-
Petri Lehtinen authored
Expand the pack/unpack API: json_(un)pack is the simple version with no error output, json_(un)pack_ex has error output and flags, json_v(un)pack_ex is a va_list version of json_(un)pack_ex. Implement unpacking flags: - JSON_UNPACK_ONLY turns off extra validation, i.e. array and object unpacking doesn't check that all items are unpacked. This is really just convenience for not adding '*' after each object and array. - JSON_VALIDATE_ONLY turns off unpacking, i.e. no varargs are expected and nothing is unpacked.
-
Petri Lehtinen authored
* By default, json_unpack() now checks that all items of arrays and objects are unpacked. This is useful for validation. * Add format specifier '*' to suppress this check for individual arrays and objects. '*' must appear as the last format specifier before the closing ']' or '}'.
-
Petri Lehtinen authored
-
Petri Lehtinen authored
* Use the format string scanner from the previous commit (with the simpler separator skipping semantics) * Split json_vnunpack() to three separate functions for unpacking objects, arrays and "simple" values * Always return 0 on success, 1 on error This shaves around 100 more lines from the original implementation.
-