Age | Commit message (Collapse) | Author | Files | Lines |
|
Thanks to Manolis Delakis for reporting.
|
|
Failing to do this has the effect that the error message is not
returned when the input file cannot be opened (e.g. if it doesn't
exist).
Thanks to Martin Vopatek for reporting.
|
|
Apparently, it was forgotten to add these files to
test/testdata/Makefile.am in commit
04d550b02e8eadc0c9fb1966fe42fe9fc25f89e0.
|
|
No functional changes.
|
|
It's now an error to try to add an object or array to itself. The
encoder checks for circular references and fails with an error status
if one is detected.
|
|
Added functions:
json_string_set
json_integer_set
json_real_set
While at it, clarify the documentation and parameter naming of
json_{string,integer,real}_value() a bit.
|
|
Added functions:
json_object_size
json_object_clear
json_object_update
|
|
Because of a typo in test/testprogs/Makefile.am, the tests for object
were never compiled or run.
|
|
Added functions:
json_array_insert
json_array_insert_new
json_array_remove
json_array_clear
json_array_extend
|
|
|
|
|
|
That is, test cases where there's no newline or other whitespace at
the beginning or end of input. This was implemented by adding a
--strip option to split-testfile to strip the input file after writing
it.
The actual test JSON texts are the same as testdata/invalid and
testdata/valid. The expected output of the invalid cases had to be
adjusted a bit: because there's no newline at the end, some of the
line numbers needed to be changed.
|
|
|
|
All pointer arguments are now tested for NULL. json_string() now also
tests that strdup() succeeds. This is to ensure that no NULL values
end up in data structures.
Also desribe the different sources of errors in documentation.
|
|
Now all public API functions are tested (at least on some level) in
the test-api suite.
|
|
The non-stealing functions are now just simple wrappers around these.
|
|
|
|
This way it's an individual subdirectory and things go easier.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- Tests are now named
- Testlogs are preserved between runs
- Tests can be run through Valgrind Memcheck tool
|
|
|
|
|
|
|
|
Before, only the syntax level (parse_*) was able to set the error
string. This patch fixes the situation so that lexical (lex_*) and
stream (stream_*) levels can report detailed error messages.
Also, instead of 0, EOF is now returned by stream on error.
|
|
It's no longer needed to load the whole input into a string and then
parse from the string. Instead, the input is read as needed from
a string or file.
|
|
fdopen() makes supporting separate API for file descriptors useless.
Supporting fd's also makes Jansson less portable.
|
|
|