Petri Lehtinen
29ee3832cf
Support compilers that don't have the "inline" keyword
...
Use AC_C_INLINE autoconf macro, include config.h where needed, and add
a define of JSON_INLINE to jansson.h that has the correct "inline"
keyword.
2010-03-28 21:14:08 +03:00
Petri Lehtinen
c7c2edae8a
doc: Add chapter on RFC conformance
...
Thanks to Deron Meranda for providing the initial text.
2010-03-26 22:03:26 +02:00
Petri Lehtinen
bb89a5d4d3
Estimate real number underflows with 0.0
...
Earlier it was a decoding error.
2010-03-26 21:59:56 +02:00
Petri Lehtinen
f76966b438
Enhance tests for null byte
2010-03-26 21:29:36 +02:00
Petri Lehtinen
49880cbabe
Merge branch '1.2'
2010-03-23 08:15:19 +02:00
Petri Lehtinen
f284e3c069
Fix reference counting on true, false and null
...
Initialize their reference counts to (unsigned int)-1 to disable
reference counting on them. It already was meant to work like this,
but the reference counts were just initialized to 1 instead of -1.
Thanks to Andrew Thompson for reporting this issue.
2010-03-23 08:12:32 +02:00
Petri Lehtinen
66a69f3f10
Ignore temporary files *~
2010-03-19 08:11:48 +02:00
Andres Freund
7d5982e6fe
c++ wrapper: add missing 'inline' statements to various constructors
...
the missing 'inline' leads to duplicated symbols if the header is
included into two separately compiled files.
2010-03-18 14:35:09 +01:00
Petri Lehtinen
a2a9107600
Don't include stdint.h anywhere
...
This should have fixed by commit 28682322
, but there was one #include
left in utf.c. It now includes utf.h instead of stdint.h.
2010-03-18 07:22:43 +02:00
Petri Lehtinen
42621370c3
hashtable: Fix typo in comment
2010-02-11 21:17:19 +02:00
Petri Lehtinen
8e61b7c0f0
Merge branch 'c++-enhance-proxies'
2010-02-11 21:06:19 +02:00
Petri Lehtinen
35ddd2de20
Update CHANGES, change version to 1.2+
2010-02-11 20:55:56 +02:00
Petri Lehtinen
f18ef5144a
Implement JSON_PRESERVE_ORDER encoding flag
...
With this encoding flag, the object key-value pairs in output are in
the same order in which they were first inserted into the object.
To make this possible, a key of an object is now a serial number plus
a string. An object keeps an increasing counter which is used to
assign serial number to the keys. Hashing, comparison and public API
functions were changed to act only on the string part, i.e. the serial
number is ignored everywhere else but in the encoder, where it's used
to order object keys if JSON_PRESERVE_ORDER flag is used.
2010-02-11 20:48:56 +02:00
Petri Lehtinen
307167fb66
Optimize hashtable_set()
...
If a key already exists in the hashtable, use the existing pair
changing its value instead of removing the old one and allocating a
new pair.
2010-02-09 20:51:25 +02:00
Petri Lehtinen
7e8b128740
C++: Optimize PropertyProxy
...
When the property already exists in the object, we can store an
iterator pointing to that property, instead of duplicating the key.
When the property (key) is not present in the object, we still have to
duplicate the key.
2010-02-08 20:51:09 +02:00
Petri Lehtinen
acec2559a5
C++: Make proxies safer
...
If a user happens to store an ElementProxy or a PropertyProxy
instance, we need to take a reference to the JSON value they point to.
With PropertyProxy, the key needs to be copied as well.
2010-02-07 14:08:54 +02:00
Petri Lehtinen
286823227c
Make int32_t available on all systems
...
Use AC_TYPE_INT32_T and include inttypes.h (if it exists) instead of
stdint.h for maximum portability.
2010-02-06 21:11:41 +02:00
Petri Lehtinen
8d75235ff2
Merge branch '1.2'
...
Conflicts:
LICENSE
2010-02-04 21:13:57 +02:00
Petri Lehtinen
79e9dae9a0
Merge branch 'cleanup-c++-code'
2010-02-04 21:12:36 +02:00
Petri Lehtinen
f021ba00a2
C++: Fix test_cpp.cpp to work with VPATH builds
...
It reads an input file, and the file location is different with VPATH
builds. Read top_srcdir from environment and use it to find the file.
2010-02-04 21:10:04 +02:00
Petri Lehtinen
adb1b58627
C++: Add Value::dump_file(), load_file() and loads() that take an std::string
2010-02-04 21:08:42 +02:00
Petri Lehtinen
b8059a1880
C++: Rename some functions to better match the C API
...
Value::save_file -> Value::dump_file
Value::save_string -> Value::dumps
load_string -> loads
2010-02-04 21:08:38 +02:00
Petri Lehtinen
49d40f020b
C++: #include <cstdio> in jansson.hpp
...
This is to avoid standard C functions ending up in namespace json, as
jansson.h is #included in there, and jansson.h in turn #includes
stdio.h.
2010-02-04 20:50:02 +02:00
Petri Lehtinen
910a2f318b
C++: Rename test.json to test_cpp.json
2010-02-04 20:49:01 +02:00
Petri Lehtinen
08dc8d9baf
Add year 2010 to copyright notices
2010-02-02 21:26:11 +02:00
Petri Lehtinen
c9fc055351
Add myself as another copyright holder for jansson.hpp and jansson.ipp
2010-02-02 21:14:50 +02:00
Petri Lehtinen
d1a0c3ffc2
C++: Rename jansson-impl.hpp to jansson.ipp
...
The .ipp suffix is for inlined template implementation code.
While at it, use #ifdef and #ifndef instead of #if defined().
2010-02-02 21:10:58 +02:00
Petri Lehtinen
b07e69c37a
C++: Rename namespace json::_private to json::detail
2010-02-02 21:01:50 +02:00
Petri Lehtinen
2b43e7dbda
C++: Untabify, reindent, delete trailing whitespace
2010-02-02 21:00:10 +02:00
Petri Lehtinen
5b1a666cf1
test/suites/api: Detect tests correctly
...
The C++ test case didn't work correctly in VPATH builds or with
VALGRIND=1.
2010-02-02 20:37:02 +02:00
Petri Lehtinen
b495b96547
Add functions json_object_iter_{at,set,set_new}
2010-02-01 21:07:19 +02:00
Petri Lehtinen
72e3948438
Merge branch '1.2'
2010-01-28 21:05:19 +02:00
Petri Lehtinen
f5662a82cd
test/suites/api/test_object.c: Enhance tests for iterators
2010-01-28 21:04:21 +02:00
Petri Lehtinen
ab2e567685
test/suites/api: Fail when a test fails
...
The valgrind fix a while back apparently made the test system not
notice normal failures in suites/api.
2010-01-28 20:58:26 +02:00
Petri Lehtinen
d8ea2f8c4b
run-tests.sh: Print the test name correctly when VERBOSE=1
2010-01-28 20:57:52 +02:00
Petri Lehtinen
aaae37afba
doc/Makefile.am: Don't remove changes.rst in clean
2010-01-26 21:19:48 +02:00
Petri Lehtinen
04f7e27877
Update LICENSE
2010-01-21 22:31:06 +02:00
Petri Lehtinen
3dd29366b8
Merge branch 'c++-api'
2010-01-21 22:29:26 +02:00
Petri Lehtinen
8c2ca3fae6
jansson 1.2
2010-01-21 21:49:10 +02:00
Petri Lehtinen
2ae279e0d4
test/run-suites: Be less picky when searching for tests
...
This is to better catch distribution errors. It's easier to notice
that run-tests fails than to notice that one of many test suites is
silently skipped.
2010-01-21 21:49:04 +02:00
Petri Lehtinen
4c6cb6afd1
Distribute some missing files
2010-01-21 21:48:31 +02:00
Petri Lehtinen
78594e9bd3
Remove CHANGES preprocessing, as it didn't work with VPATH builds
...
The problem is that Sphinx can only read input files from a single
directory. In VPATH builds, the source and build trees are separate,
and the changes.rst went into the build tree.
This patch solves the issue by using cfunc as the Sphinx default role.
2010-01-21 20:53:05 +02:00
Petri Lehtinen
e921e63b54
CHANGES: Update for v1.2
2010-01-19 21:19:37 +02:00
Sean Middleditch
38950b081c
add meaningful copyright to jansson-impl.hpp too
2010-01-18 21:55:41 -08:00
Sean Middleditch
56687e9b56
add meaningful copyright to jansson.hpp
2010-01-18 21:55:25 -08:00
Sean Middleditch
c9b33e3386
integrate jansson.hpp into build and test suite
2010-01-18 21:36:02 -08:00
Sean Middleditch
2ad4634de5
Merge branch 'master' of /home/elanthis/Source/janssonxx
...
Conflicts:
.gitignore
2010-01-18 21:26:10 -08:00
Sean Middleditch
e080667729
replace json::from() with explicit Value() constructors
2010-01-18 19:24:25 -08:00
Sean Middleditch
ef6c35ae1b
move static functions out of Value, add test driver to ensure linking works properly
2010-01-18 18:50:13 -08:00
Sean Middleditch
95bf762eeb
rename jansson namespace to json
2010-01-18 18:37:13 -08:00