Age | Commit message (Collapse) | Author | Files | Lines |
|
Conflicts:
configure.ac
|
|
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.
|
|
Earlier it was a decoding error.
|
|
|
|
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.
|
|
the missing 'inline' leads to duplicated symbols if the header is
included into two separately compiled files.
|
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
Use AC_TYPE_INT32_T and include inttypes.h (if it exists) instead of
stdint.h for maximum portability.
|
|
Conflicts:
LICENSE
|
|
|
|
Value::save_file -> Value::dump_file
Value::save_string -> Value::dumps
load_string -> loads
|
|
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.
|
|
|
|
|
|
The .ipp suffix is for inlined template implementation code.
While at it, use #ifdef and #ifndef instead of #if defined().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Conflicts:
.gitignore
|
|
|
|
There are some places where we copy a string from an existing JSON
value. In these cases the string has already been checked for valid
UTF-8.
|
|
|
|
|
|
Added functions are:
* json_string_nocheck()
* json_string_set_nocheck()
* json_object_set_nocheck()
* json_object_set_new_nocheck()
These functions don't check that their string argument is valid UTF-8,
but assume that the user has already performed the check.
|
|
|
|
It's incorrect as these functions modify the value.
|
|
Conflicts:
configure.ac
doc/conf.py
|
|
|
|
This patch changes the sprintf format from "%0.17f" to "%.17g", as the
f format specifier doesn't print the exponent at all. This caused
losing precision in all but the most simple cases.
Because the g specifier doesn't print the decimal fraction or exponent
if they're not needed, a ".0" has to be appended by hand in these
cases. Otherwise the value's type changes from real to integer when
decoding again.
Thanks to Philip Grandinetti for reporting this issue.
|
|
With this flag, the objects are sorted by key when encoding.
|
|
With this flag, all Unicode characters outside the ASCII range are
escaped.
|
|
On some architectures, int just isn't big enough to hold all Unicode
code points.
|
|
This way we don't pollute the symbol namespace with internal symbols.
|
|
|
|
Conflicts:
configure.ac
doc/conf.py
|
|
|
|
It's not needed
|
|
Conflicts:
test/.gitignore
test/testprogs/Makefile.am
|
|
- Never append newline to output
- By default, add spaces between array and object items for more
readable output
- Introduce the flag JSON_COMPACT to not add the aforementioned spaces
|