aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-10-19Enhance documentationPetri Lehtinen5-52/+92
- Add more information to the documentation front page - Document how to build the documentation - Clarify the tutorial a bit and remove some quirks - Bring README.rst up-to-date - Small enhancements here and there
2009-10-19Add C++ guards to jansson.hraoulh1-0/+8
Signed-off-by: Petri Lehtinen <petri@digip.org>
2009-10-17doc: Add tutorialPetri Lehtinen4-0/+439
2009-10-16Fix indentationPetri Lehtinen7-18/+19
No functional changes.
2009-10-15json_dumpf: Document the output shortage on errorPetri Lehtinen1-0/+3
2009-10-15Enhance handling of circular referencesPetri Lehtinen6-42/+182
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.
2009-10-15json_dumps: Close the strbuffer if dumping failsPetri Lehtinen1-2/+6
2009-10-15doc: Fix a small typo in apirefPetri Lehtinen1-1/+1
2009-10-14doc/Makefile.am: Remove *.pyc in cleanPetri Lehtinen1-0/+1
2009-10-14Make integer, real and string mutablePetri Lehtinen4-14/+106
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.
2009-10-13Don't use non-portable asprintf()Petri Lehtinen1-14/+13
Thanks to Adam Strzelecki for reporting.
2009-10-11Merge branch '1.0'Petri Lehtinen6-9/+16
Conflicts: configure.ac doc/conf.py
2009-10-11jansson 1.0.4v1.0.41.0Petri Lehtinen4-3/+10
2009-10-11Fix API tests for objectPetri Lehtinen1-1/+1
Because of a typo in test/testprogs/Makefile.am, the tests for object were never compiled or run.
2009-10-11Remove config.h.inPetri Lehtinen2-59/+1
It doesn't have to be in version control.
2009-10-11Extend object APIPetri Lehtinen6-17/+255
Added functions: json_object_size json_object_clear json_object_update
2009-10-10Fix API tests for objectPetri Lehtinen2-1/+3
Because of a typo in test/testprogs/Makefile.am, the tests for object were never compiled or run.
2009-10-10Check json_object_set_new argumentsPetri Lehtinen1-1/+1
A segfault was caused by NULL key.
2009-10-10Remove config.h.inPetri Lehtinen2-59/+1
It doesn't have to be in version control.
2009-10-06Fix a few more compilation issuesPetri Lehtinen1-2/+2
These were left out from the previous commit.
2009-10-01Make it compile on platforms where char is unsignedPetri Lehtinen2-3/+3
Linux on powerpc seems to be one such platform.
2009-10-01Relax Autoconf version prereqPetri Lehtinen1-1/+1
From 2.63 to 2.59, which is more widely supported.
2009-09-29Extend array APIPetri Lehtinen5-16/+439
Added functions: json_array_insert json_array_insert_new json_array_remove json_array_clear json_array_extend
2009-09-20doc: Add getting started guidePetri Lehtinen2-0/+92
2009-09-14Merge branch '1.0'Petri Lehtinen4-3/+13
Conflicts: configure.ac doc/conf.py
2009-09-14jansson 1.0.3v1.0.3Petri Lehtinen4-3/+13
2009-09-14load: Check for integer and real overlfows and underflowsPetri Lehtinen2-9/+65
Backported from master, commit 5406c2b3d347505149d382213b6f318f8c35de6a: * deleted test/testdata/invalid-stripped because the stripped tests don't exist in 1.0
2009-09-14test/json-compare.py: Use json module from Python >=2.6 or simplejsonPetri Lehtinen1-3/+6
Backported from master, commit 9d16ec755c9754fe1f79fe55ab719a7f8578ce37
2009-09-13load: Check for integer and real overlfows and underflowsPetri Lehtinen3-9/+90
2009-09-13Use unsigned long instead of uint32_tPetri Lehtinen3-11/+11
Some day we will have ANSI C compatibility... This change doesn't make the API backwards incompatible because uint32_t was only used in flags to json_dump*() and the flags are meant to be used only by ORing constants and macro output, and actually currently only JSON_INDENT can be used.
2009-09-11test/json-compare.py: Use json module from Python >=2.6 or simplejsonPetri Lehtinen1-3/+6
2009-09-08Add stripped unit tests for decoderPetri Lehtinen6-7/+287
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.
2009-09-08Merge branch '1.0' into HEADPetri Lehtinen6-9/+10
Conflicts: configure.ac doc/conf.py
2009-09-08Distribute CHANGESPetri Lehtinen1-1/+1
2009-09-08jansson 1.0.2v1.0.2Petri Lehtinen4-3/+7
2009-09-08load: Handle EOF correctlyPetri Lehtinen1-5/+2
In stream_get(), EOF never got it to stream->buffer and because of this, stream_unget() failed on some situations. This patch makes stream_get() handle EOF just like any other byte. As a "side effect", lex_scan_string() now needs to unget the EOF, or otherwise it ends up in error message on premature end of input.
2009-09-07Don't perform reference counting on true, false and nullPetri Lehtinen2-8/+8
This makes their constructors thread safe. A special reference count -1 is used to test whether to perform reference counting on a value or not.
2009-09-07test/.gitignore: Add testprogs/test_simplePetri Lehtinen1-0/+1
2009-09-07doc apiref: EnhancementsPetri Lehtinen1-36/+55
Constructors are described more clearly and return values on error situations more compehensively. Also add an example of the object iteration protocol.
2009-09-06Better argument validationPetri Lehtinen5-7/+68
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.
2009-09-06Don't include unistd.hPetri Lehtinen2-2/+0
It's not needed.
2009-09-06doc apiref: json_incref() returns its argumentPetri Lehtinen1-1/+1
2009-09-06Expand test coveragePetri Lehtinen3-2/+109
Now all public API functions are tested (at least on some level) in the test-api suite.
2009-09-06Merge branch '1.0'Petri Lehtinen5-4/+11
Conflicts: configure.ac doc/conf.py
2009-09-06Add CHANGESPetri Lehtinen1-0/+7
2009-09-04jansson 1.0.1v1.0.1Petri Lehtinen3-3/+3
2009-09-04jansson.h: Fix typoPetri Lehtinen1-1/+1
json_is_true was spelled jsin_is_true. Quite fatal.
2009-09-04dump: Optimize indentingPetri Lehtinen1-8/+9
Don't alloca() a whitespace buffer and fill it with spaces in each call to dump_indent. Instead, use a static whitespace buffer. As a bonus, this saves the use of poorly portable alloca().
2009-09-04load: Factor out an unneeded strdupPetri Lehtinen1-1/+12
By "stealing" the string parsed out in lexer, one strdup can be saved.
2009-09-04Don't define -std=c99 in AM_CFLAGSPetri Lehtinen1-1/+1
It is not needed.