Petri Lehtinen
f243930b68
json_load_file: Initialize the error struct properly
...
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.
2009-10-27 17:56:02 +02:00
Petri Lehtinen
d1b07171cc
Merge branch '1.1'
...
Conflicts:
CHANGES
configure.ac
doc/conf.py
2009-10-26 21:33:03 +02:00
Petri Lehtinen
15d992cb6a
jansson 1.1.1
2009-10-26 21:27:10 +02:00
Petri Lehtinen
59c58ea26c
Build documentation in distcheck-hook
...
This is to check that all the documentation files are distributed
before releasing.
2009-10-25 00:20:23 +03:00
Petri Lehtinen
f95bb423a3
Really distribute all the docs
...
The tutorial example github_commits.c was still left out.
2009-10-25 00:17:16 +03:00
Petri Lehtinen
9448ed3ef7
Distribute all the docs
2009-10-24 14:16:12 +03:00
Petri Lehtinen
7c7a1ed01e
Fix version 1.1 release date in CHANGES
2009-10-24 14:16:11 +03:00
Petri Lehtinen
5ff8ae8052
Fix version 1.1 release date in CHANGES
2009-10-21 08:52:34 +03:00
Petri Lehtinen
8d53f447bf
Set the version number to 1.1+
2009-10-21 08:51:43 +03:00
Petri Lehtinen
325101e525
jansson 1.1
2009-10-20 21:29:16 +03:00
Petri Lehtinen
1b02f3546c
Distribute stripped unit test data
...
Apparently, it was forgotten to add these files to
test/testdata/Makefile.am in commit
04d550b02e
.
2009-10-20 21:23:49 +03:00
Petri Lehtinen
cd96049d10
Enhance documentation
...
- 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-19 21:56:11 +03:00
raoulh
a83cd30c31
Add C++ guards to jansson.h
...
Signed-off-by: Petri Lehtinen <petri@digip.org>
2009-10-19 12:22:21 +03:00
Petri Lehtinen
a00988f663
doc: Add tutorial
2009-10-17 14:18:40 +03:00
Petri Lehtinen
86dc1d629b
Fix indentation
...
No functional changes.
2009-10-16 21:20:38 +03:00
Petri Lehtinen
b67e130fda
json_dumpf: Document the output shortage on error
2009-10-15 21:06:59 +03:00
Petri Lehtinen
4cd777712b
Enhance handling of circular references
...
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-15 21:02:27 +03:00
Petri Lehtinen
79009e62c1
json_dumps: Close the strbuffer if dumping fails
2009-10-15 20:54:32 +03:00
Petri Lehtinen
76999799ed
doc: Fix a small typo in apiref
2009-10-15 17:39:49 +03:00
Petri Lehtinen
22af193a51
doc/Makefile.am: Remove *.pyc in clean
2009-10-14 22:09:14 +03:00
Petri Lehtinen
951d091f07
Make integer, real and string mutable
...
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-14 08:23:02 +03:00
Petri Lehtinen
185e107d24
Don't use non-portable asprintf()
...
Thanks to Adam Strzelecki for reporting.
2009-10-13 15:40:26 +03:00
Petri Lehtinen
ca7703fbd1
Merge branch '1.0'
...
Conflicts:
configure.ac
doc/conf.py
2009-10-11 21:51:54 +03:00
Petri Lehtinen
12cd4e8c09
jansson 1.0.4
2009-10-11 21:38:42 +03:00
Petri Lehtinen
bad16ea52a
Fix API tests for object
...
Because of a typo in test/testprogs/Makefile.am, the tests for object
were never compiled or run.
2009-10-11 21:38:42 +03:00
Petri Lehtinen
30015bde90
Remove config.h.in
...
It doesn't have to be in version control.
2009-10-11 21:38:41 +03:00
Petri Lehtinen
1e00cd58a5
Extend object API
...
Added functions:
json_object_size
json_object_clear
json_object_update
2009-10-11 20:44:01 +03:00
Petri Lehtinen
40bb7bf437
Fix API tests for object
...
Because of a typo in test/testprogs/Makefile.am, the tests for object
were never compiled or run.
2009-10-10 22:55:15 +03:00
Petri Lehtinen
9d648a87cb
Check json_object_set_new arguments
...
A segfault was caused by NULL key.
2009-10-10 22:53:36 +03:00
Petri Lehtinen
8de850be95
Remove config.h.in
...
It doesn't have to be in version control.
2009-10-10 21:21:22 +03:00
Petri Lehtinen
19588c2d69
Fix a few more compilation issues
...
These were left out from the previous commit.
2009-10-06 13:22:27 +03:00
Petri Lehtinen
9c5a8430db
Make it compile on platforms where char is unsigned
...
Linux on powerpc seems to be one such platform.
2009-10-01 21:54:45 +03:00
Petri Lehtinen
afc9c1a23a
Relax Autoconf version prereq
...
From 2.63 to 2.59, which is more widely supported.
2009-10-01 21:54:29 +03:00
Petri Lehtinen
cbacac5975
Extend array API
...
Added functions:
json_array_insert
json_array_insert_new
json_array_remove
json_array_clear
json_array_extend
2009-09-29 22:17:58 +03:00
Petri Lehtinen
b3e1fe2ec5
doc: Add getting started guide
2009-09-20 21:56:12 +03:00
Petri Lehtinen
7728716759
Merge branch '1.0'
...
Conflicts:
configure.ac
doc/conf.py
2009-09-14 15:06:06 +03:00
Petri Lehtinen
b7bf96996f
jansson 1.0.3
2009-09-14 14:32:41 +03:00
Petri Lehtinen
6d8c287032
load: Check for integer and real overlfows and underflows
...
Backported from master, commit 5406c2b3d3
:
* deleted test/testdata/invalid-stripped because the stripped tests
don't exist in 1.0
2009-09-14 10:28:03 +03:00
Petri Lehtinen
ab3764ed0a
test/json-compare.py: Use json module from Python >=2.6 or simplejson
...
Backported from master, commit 9d16ec755c
2009-09-14 10:27:51 +03:00
Petri Lehtinen
5406c2b3d3
load: Check for integer and real overlfows and underflows
2009-09-13 13:18:01 +03:00
Petri Lehtinen
743af38e7f
Use unsigned long instead of uint32_t
...
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-13 13:16:34 +03:00
Petri Lehtinen
9d16ec755c
test/json-compare.py: Use json module from Python >=2.6 or simplejson
2009-09-11 22:22:34 +03:00
Petri Lehtinen
04d550b02e
Add stripped unit tests for decoder
...
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-08 17:03:01 +03:00
Petri Lehtinen
55d2566539
Merge branch '1.0' into HEAD
...
Conflicts:
configure.ac
doc/conf.py
2009-09-08 17:02:39 +03:00
Petri Lehtinen
9cc6fbe580
Distribute CHANGES
2009-09-08 16:57:45 +03:00
Petri Lehtinen
827a01937f
jansson 1.0.2
2009-09-08 16:48:26 +03:00
Petri Lehtinen
0f62dac627
load: Handle EOF correctly
...
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-08 16:41:07 +03:00
Petri Lehtinen
7ee974e91c
Don't perform reference counting on true, false and null
...
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-07 21:40:14 +03:00
Petri Lehtinen
c288188a0f
test/.gitignore: Add testprogs/test_simple
2009-09-07 21:25:22 +03:00
Petri Lehtinen
057ba29a27
doc apiref: Enhancements
...
Constructors are described more clearly and return values on error
situations more compehensively. Also add an example of the object
iteration protocol.
2009-09-07 21:09:55 +03:00