jansson.git
11 years agoupdate spec version master v2.4-moonshot
Sam hartman [Wed, 17 Apr 2013 11:27:40 +0000 (12:27 +0100)]
update spec version

11 years agoMerge commit 'v2.4' into HEAD
Sam hartman [Wed, 17 Apr 2013 11:26:04 +0000 (12:26 +0100)]
Merge commit 'v2.4' into HEAD

Conflicts:
Makefile.am

11 years agojansson 2.4
Petri Lehtinen [Sat, 22 Sep 2012 16:22:34 +0000 (19:22 +0300)]
jansson 2.4

11 years agoDistribute win32 files
Petri Lehtinen [Sat, 22 Sep 2012 11:34:27 +0000 (14:34 +0300)]
Distribute win32 files

11 years agoUpdate CHANGES for v2.4
Petri Lehtinen [Sat, 22 Sep 2012 11:25:52 +0000 (14:25 +0300)]
Update CHANGES for v2.4

11 years agodoc: Add versionadded directive for json_boolean()
Petri Lehtinen [Sat, 22 Sep 2012 11:25:29 +0000 (14:25 +0300)]
doc: Add versionadded directive for json_boolean()

11 years agoMerge pull request #90 from luke-jr/patch-1
Petri Lehtinen [Wed, 19 Sep 2012 04:11:26 +0000 (21:11 -0700)]
Merge pull request #90 from luke-jr/patch-1

Add -no-undefined to LDFLAGS

11 years agoAdd -no-undefined to LDFLAGS
Luke Dashjr [Sat, 15 Sep 2012 08:43:46 +0000 (08:43 +0000)]
Add -no-undefined to LDFLAGS

This tells libtool that jansson does not require any external symbols, and allows building it as a shared library (DLL) on Windows.

11 years agoDisallow NaN or Inf real values
Petri Lehtinen [Thu, 13 Sep 2012 18:30:19 +0000 (21:30 +0300)]
Disallow NaN or Inf real values

11 years agoFix json_real_set() to return -1 on error
Petri Lehtinen [Thu, 13 Sep 2012 05:46:14 +0000 (08:46 +0300)]
Fix json_real_set() to return -1 on error

11 years agoFix a typo on doc/apiref.rst
Petri Lehtinen [Thu, 6 Sep 2012 09:06:41 +0000 (12:06 +0300)]
Fix a typo on doc/apiref.rst

11 years agoFix a typo in README.rst
Petri Lehtinen [Wed, 5 Sep 2012 18:16:43 +0000 (21:16 +0300)]
Fix a typo in README.rst

11 years agoCHANGES entry for #88
Petri Lehtinen [Sat, 11 Aug 2012 17:44:58 +0000 (20:44 +0300)]
CHANGES entry for #88

11 years agoMerge branch '2.3'
Petri Lehtinen [Sat, 11 Aug 2012 17:43:24 +0000 (20:43 +0300)]
Merge branch '2.3'

11 years agofix check-exports test on ppc64
Alessandro Ghedini [Sat, 11 Aug 2012 13:13:47 +0000 (15:13 +0200)]
fix check-exports test on ppc64

11 years agoAdd an initial CHANGES entry for v2.4
Petri Lehtinen [Mon, 30 Jul 2012 04:51:53 +0000 (07:51 +0300)]
Add an initial CHANGES entry for v2.4

11 years agoAdd json_boolean() macro
Petri Lehtinen [Mon, 30 Jul 2012 04:20:36 +0000 (07:20 +0300)]
Add json_boolean() macro

Mostly for symmetry reasons. Makes it easier e.g. to:

  int ok = 0;
  if(something)
      ok = 1;

  json_object_set_new(obj, "ok", json_boolean(ok));

Fixes #86.

11 years agoMerge branch '2.3'
Petri Lehtinen [Fri, 27 Jul 2012 04:28:40 +0000 (07:28 +0300)]
Merge branch '2.3'

11 years agoFix a small error in tutorial
Petri Lehtinen [Fri, 27 Jul 2012 04:28:18 +0000 (07:28 +0300)]
Fix a small error in tutorial

Fixes #84.

11 years agoDocument the JSON_ESCAPE_SLASH encoding flag
Petri Lehtinen [Fri, 29 Jun 2012 10:09:36 +0000 (13:09 +0300)]
Document the JSON_ESCAPE_SLASH encoding flag

11 years agoTweak slash escaping
Petri Lehtinen [Fri, 29 Jun 2012 10:11:41 +0000 (13:11 +0300)]
Tweak slash escaping

11 years agoMerge branch 'fix-slash' of git://github.com/jrbasso/jansson
Petri Lehtinen [Fri, 29 Jun 2012 10:17:55 +0000 (13:17 +0300)]
Merge branch 'fix-slash' of git://github.com/jrbasso/jansson

Fixes #81.

11 years agoCreated flag to dump escaping slash
Juan Basso [Fri, 29 Jun 2012 02:04:36 +0000 (22:04 -0400)]
Created flag to dump escaping slash

11 years agoEscaping the slash when dump
Juan Basso [Thu, 28 Jun 2012 03:50:01 +0000 (23:50 -0400)]
Escaping the slash when dump

11 years agoMerge branch '2.3'
Petri Lehtinen [Wed, 6 Jun 2012 18:10:28 +0000 (21:10 +0300)]
Merge branch '2.3'

11 years agoBugfix: must cast void* to do pointer math
Paul Harris [Sun, 3 Jun 2012 18:17:29 +0000 (02:17 +0800)]
Bugfix: must cast void* to do pointer math

Fixes #78.

11 years agoBugfix: Changed all use of ssize_t to size_t.
Paul Harris [Sun, 3 Jun 2012 18:19:35 +0000 (02:19 +0800)]
Bugfix: Changed all use of ssize_t to size_t.

ssize_t is only used in a test, and its comparing to a size_t variable.

Fixes #77.

11 years agoUpdate the documentation to mention Visual Studio 2010 support
Petri Lehtinen [Sat, 19 May 2012 18:22:59 +0000 (21:22 +0300)]
Update the documentation to mention Visual Studio 2010 support

11 years agoMerge pull request #74 from rogerz/contrib
Petri Lehtinen [Thu, 3 May 2012 18:31:19 +0000 (11:31 -0700)]
Merge pull request #74 from rogerz/contrib

Add vs2010 solution and project, fix warnings under MinGW

11 years agoFix build warnings under MinGW
Rogerz Zhang [Mon, 30 Apr 2012 14:32:25 +0000 (22:32 +0800)]
Fix build warnings under MinGW

11 years agoAdd vs2010 solution and project
Rogerz Zhang [Mon, 30 Apr 2012 11:39:45 +0000 (19:39 +0800)]
Add vs2010 solution and project

11 years agoSupport building on Windows
Petri Lehtinen [Sun, 29 Apr 2012 19:09:29 +0000 (22:09 +0300)]
Support building on Windows

Jansson now builds correctly with Visual C++ Express 2010.

11 years agoMerge branch '2.3'
Petri Lehtinen [Thu, 26 Apr 2012 19:11:22 +0000 (22:11 +0300)]
Merge branch '2.3'

11 years agofix slight typo in json_pack apiref example
Jack Mitchell [Thu, 26 Apr 2012 13:38:37 +0000 (14:38 +0100)]
fix slight typo in json_pack apiref example

Fixes #73.

11 years agoMerge branch '2.3'
Petri Lehtinen [Thu, 26 Apr 2012 19:09:48 +0000 (22:09 +0300)]
Merge branch '2.3'

11 years agofix slight typo in json_pack apiref example
Jack Mitchell [Thu, 26 Apr 2012 13:38:37 +0000 (14:38 +0100)]
fix slight typo in json_pack apiref example

Fixes #73.

12 years agoMerge branch '2.3'
Petri Lehtinen [Thu, 26 Apr 2012 06:00:49 +0000 (09:00 +0300)]
Merge branch '2.3'

12 years agoCheck for missing args and envvars in run-tests.sh
Petri Lehtinen [Thu, 26 Apr 2012 05:58:31 +0000 (08:58 +0300)]
Check for missing args and envvars in run-tests.sh

Fixes #71.

12 years agoMerge branch '2.3'
Petri Lehtinen [Fri, 20 Apr 2012 18:41:25 +0000 (21:41 +0300)]
Merge branch '2.3'

Conflicts:
configure.ac
doc/conf.py
src/jansson.h

12 years agojansson 2.3.1
Petri Lehtinen [Fri, 20 Apr 2012 18:35:00 +0000 (21:35 +0300)]
jansson 2.3.1

12 years agoMerge branch '2.3'
Petri Lehtinen [Wed, 18 Apr 2012 18:59:10 +0000 (21:59 +0300)]
Merge branch '2.3'

12 years agoFix tutorial to use Github API v3
Petri Lehtinen [Wed, 18 Apr 2012 18:55:24 +0000 (21:55 +0300)]
Fix tutorial to use Github API v3

The v2 API will be shut down on May 1st 2012.

Fixes #65.

12 years agoMerge branch '2.3'
Petri Lehtinen [Wed, 18 Apr 2012 18:27:24 +0000 (21:27 +0300)]
Merge branch '2.3'

Closes #70.

12 years agoload: Change buffer_pos to be a size_t
Janne Kulmala [Tue, 17 Apr 2012 08:05:12 +0000 (11:05 +0300)]
load: Change buffer_pos to be a size_t

buffer_pos should be type size_t, because it's used to store the
current position in the read buffer. Also, it never can be negative.

12 years agoload: Avoid unexpected behaviour in macro expansion
Janne Kulmala [Tue, 17 Apr 2012 07:53:53 +0000 (10:53 +0300)]
load: Avoid unexpected behaviour in macro expansion

Macros can be dangerous if the inserted arguments are not properly
parenthesised. As macro expansion does a simple replacement, inserting
a certain expression can cause the evaluation order of the macro expression
to change.

12 years agoDocument and tweak json_load_callback()
Petri Lehtinen [Mon, 26 Mar 2012 18:52:01 +0000 (21:52 +0300)]
Document and tweak json_load_callback()

Change the return value of json_load_callback_t to size_t, as it's
feels more correct. The callback should return (size_t)-1 on failure.

Issue #57.

12 years agoMerge pull request #60 from rogerz/contrib
Petri Lehtinen [Sun, 25 Mar 2012 17:46:45 +0000 (10:46 -0700)]
Merge pull request #60 from rogerz/contrib

Ignore the binary test_load_callback

12 years agoIgnore the binary test_load_callback
Rogerz [Sun, 25 Mar 2012 13:22:09 +0000 (13:22 +0000)]
Ignore the binary test_load_callback

12 years agoMerge branch '2.3'
Petri Lehtinen [Thu, 22 Mar 2012 07:02:51 +0000 (09:02 +0200)]
Merge branch '2.3'

12 years agoAdd json_load_callback to the list of exported symbols
Petri Lehtinen [Thu, 22 Mar 2012 07:02:21 +0000 (09:02 +0200)]
Add json_load_callback to the list of exported symbols

12 years agoMerge pull request #57 from rogerz/contrib
Petri Lehtinen [Thu, 22 Mar 2012 07:00:24 +0000 (00:00 -0700)]
Merge pull request #57 from rogerz/contrib

Add json_load_callback()

12 years agoAdd json_load_callback()
Rogerz Zhang [Wed, 21 Mar 2012 08:34:14 +0000 (16:34 +0800)]
Add json_load_callback()

12 years agoMake test stripping locale independent
Petri Lehtinen [Thu, 22 Mar 2012 06:48:28 +0000 (08:48 +0200)]
Make test stripping locale independent

12 years agoMerge branch '2.3'
Petri Lehtinen [Wed, 21 Mar 2012 12:03:49 +0000 (14:03 +0200)]
Merge branch '2.3'

Closes #56.

12 years agoIgnore *.exe
Rogerz Zhang [Sun, 18 Mar 2012 11:57:38 +0000 (19:57 +0800)]
Ignore *.exe

12 years agoMerge branch '2.3'
Petri Lehtinen [Tue, 20 Mar 2012 18:56:00 +0000 (20:56 +0200)]
Merge branch '2.3'

12 years agoUpdate copyright notices for 2012
Petri Lehtinen [Tue, 20 Mar 2012 18:55:55 +0000 (20:55 +0200)]
Update copyright notices for 2012

12 years agoMerge branch '2.3'
Petri Lehtinen [Tue, 20 Mar 2012 18:48:36 +0000 (20:48 +0200)]
Merge branch '2.3'

12 years agoMake sure strtoll() is available when using long long
Petri Lehtinen [Tue, 20 Mar 2012 18:46:17 +0000 (20:46 +0200)]
Make sure strtoll() is available when using long long

12 years agoMerge branch '2.3'
Petri Lehtinen [Sun, 11 Mar 2012 19:16:41 +0000 (21:16 +0200)]
Merge branch '2.3'

12 years agoRemove unused declarations
Petri Lehtinen [Sun, 11 Mar 2012 18:50:58 +0000 (20:50 +0200)]
Remove unused declarations

12 years agoMerge branch '2.3'
Petri Lehtinen [Thu, 8 Mar 2012 13:03:03 +0000 (15:03 +0200)]
Merge branch '2.3'

12 years agoFix tests on shells that don't support the export FOO=bar syntax
Petri Lehtinen [Thu, 8 Mar 2012 13:01:52 +0000 (15:01 +0200)]
Fix tests on shells that don't support the export FOO=bar syntax

12 years agoMerge branch '2.3'
Petri Lehtinen [Sun, 12 Feb 2012 14:05:35 +0000 (16:05 +0200)]
Merge branch '2.3'

12 years agoDisribute the check-exports tests
Petri Lehtinen [Sun, 12 Feb 2012 14:05:27 +0000 (16:05 +0200)]
Disribute the check-exports tests

12 years agoMerge branch '2.3'
Petri Lehtinen [Thu, 2 Feb 2012 15:03:03 +0000 (17:03 +0200)]
Merge branch '2.3'

12 years agodoc: Fix the names of library version constants
Petri Lehtinen [Thu, 2 Feb 2012 15:00:23 +0000 (17:00 +0200)]
doc: Fix the names of library version constants

Fixes #52.

12 years agoMerge branch '2.3'
Petri Lehtinen [Mon, 30 Jan 2012 19:23:49 +0000 (21:23 +0200)]
Merge branch '2.3'

12 years agoMake test_load.c not depend on the C locale
Petri Lehtinen [Mon, 30 Jan 2012 19:23:15 +0000 (21:23 +0200)]
Make test_load.c not depend on the C locale

Fixes #51.

12 years agoSet master to 2.4 development mode
Petri Lehtinen [Mon, 30 Jan 2012 18:59:32 +0000 (20:59 +0200)]
Set master to 2.4 development mode

12 years agojansson 2.3
Petri Lehtinen [Fri, 27 Jan 2012 19:02:12 +0000 (21:02 +0200)]
jansson 2.3

12 years agoAdd support for optional object keys for json_unpack() and friends
Petri Lehtinen [Thu, 26 Jan 2012 19:13:07 +0000 (21:13 +0200)]
Add support for optional object keys for json_unpack() and friends

Initial patch by Andrew Thompson.

12 years agoAdd json_object_update_{existing,missing}
Petri Lehtinen [Tue, 24 Jan 2012 19:03:36 +0000 (21:03 +0200)]
Add json_object_update_{existing,missing}

Closes #37.

12 years agoImplement json_object_foreach()
Petri Lehtinen [Tue, 24 Jan 2012 18:37:08 +0000 (20:37 +0200)]
Implement json_object_foreach()

Also change many places to use it internally to replace hand-crafted
iteration.

Closes #45, #46.

12 years agoMake hashtable less generic
Petri Lehtinen [Tue, 24 Jan 2012 18:36:31 +0000 (20:36 +0200)]
Make hashtable less generic

This will make it possible to implement json_object_foreach(). It
should also have some (positive) effect on speed.

12 years agoFix a potential memory leak
Petri Lehtinen [Tue, 24 Jan 2012 18:35:59 +0000 (20:35 +0200)]
Fix a potential memory leak

12 years agoWrite number of bytes read to error position on successful decode
Petri Lehtinen [Mon, 23 Jan 2012 19:18:04 +0000 (21:18 +0200)]
Write number of bytes read to error position on successful decode

Closes #49.

12 years agoMerge branch '2.2'
Petri Lehtinen [Mon, 14 Nov 2011 19:16:42 +0000 (21:16 +0200)]
Merge branch '2.2'

12 years agoRevert "json_dump_file: Open the output file in wb mode"
Petri Lehtinen [Mon, 14 Nov 2011 19:15:17 +0000 (21:15 +0200)]
Revert "json_dump_file: Open the output file in wb mode"

JSON is read as text, so line endings should be preserved.

This reverts commit 32cd82127390b9fd5b5d090bc3c279d3e4d9f3a6.

12 years agoMerge branch '2.2'
Petri Lehtinen [Mon, 14 Nov 2011 19:11:18 +0000 (21:11 +0200)]
Merge branch '2.2'

Closes GH-43.

12 years agoUpdate the documentation of JSON_DECODE_ANY
Petri Lehtinen [Mon, 14 Nov 2011 10:58:37 +0000 (12:58 +0200)]
Update the documentation of JSON_DECODE_ANY

12 years agoJSON_DECODE_ANY
Andrea Marchesini [Fri, 11 Nov 2011 18:17:29 +0000 (19:17 +0100)]
JSON_DECODE_ANY

Closes GH-4.

12 years agodoc: The same JSON values must not be encoded in parallel
Petri Lehtinen [Mon, 14 Nov 2011 17:32:42 +0000 (19:32 +0200)]
doc: The same JSON values must not be encoded in parallel

Closes GH-42.

12 years agoAvoid problems with object's serial number growing too big
Petri Lehtinen [Mon, 14 Nov 2011 17:10:28 +0000 (19:10 +0200)]
Avoid problems with object's serial number growing too big

Transform serial key comparison from substraction to real comparison.
Reset serial to zero in json_object_clear() to avoid it growing out of
bounds when reusing objects.

Closes GH-40.
Closes GH-41.

12 years agojson_load* return NULL if the first argument is NULL
Andrea Marchesini [Fri, 11 Nov 2011 18:17:50 +0000 (19:17 +0100)]
json_load* return NULL if the first argument is NULL

12 years agodoc: The configure script can be used on MinGW
Petri Lehtinen [Wed, 2 Nov 2011 06:01:32 +0000 (08:01 +0200)]
doc: The configure script can be used on MinGW

12 years agoDistribute jansson_config.h.win32
Petri Lehtinen [Wed, 2 Nov 2011 05:56:33 +0000 (07:56 +0200)]
Distribute jansson_config.h.win32

12 years agoRemove '+' and leading zeros from exponents in the encoder
Petri Lehtinen [Tue, 1 Nov 2011 18:49:15 +0000 (20:49 +0200)]
Remove '+' and leading zeros from exponents in the encoder

Fixes GH-39.

12 years agoFix test file comparisons on MinGW
Petri Lehtinen [Tue, 1 Nov 2011 17:52:20 +0000 (19:52 +0200)]
Fix test file comparisons on MinGW

Don't output any DOS line terminators from json_process.

Issue GH-39.

12 years agoUse %I64d format for printing long longs on Windows
Petri Lehtinen [Tue, 1 Nov 2011 17:41:25 +0000 (19:41 +0200)]
Use %I64d format for printing long longs on Windows

Fixes GH-38.

12 years agoAdd spec file moonshot
Sam hartman [Mon, 10 Oct 2011 13:53:16 +0000 (14:53 +0100)]
Add spec file

12 years agojson_dump_file: Open the output file in wb mode
Petri Lehtinen [Fri, 7 Oct 2011 17:52:49 +0000 (20:52 +0300)]
json_dump_file: Open the output file in wb mode

For maximum compatibility.

12 years agojansson 2.2.1 origin/2.2 origin/HEAD origin/master v2.2.1
Petri Lehtinen [Thu, 6 Oct 2011 18:16:26 +0000 (21:16 +0300)]
jansson 2.2.1

12 years agoDistribute doc/portability.rst
Petri Lehtinen [Thu, 6 Oct 2011 18:22:59 +0000 (21:22 +0300)]
Distribute doc/portability.rst

12 years agojson_load_file: Open the input file in rb mode
Petri Lehtinen [Tue, 4 Oct 2011 18:11:26 +0000 (21:11 +0300)]
json_load_file: Open the input file in rb mode

For maximum compatibility.

12 years agoDocumentation fixes
Petri Lehtinen [Tue, 4 Oct 2011 18:04:56 +0000 (21:04 +0300)]
Documentation fixes

12 years agodoc: Add project status to introduction, add portability chapter
Petri Lehtinen [Mon, 3 Oct 2011 19:42:39 +0000 (22:42 +0300)]
doc: Add project status to introduction, add portability chapter

Move the multithreading-and-setlocale documentation to the new
portability chapter.

Fixes GH-36.

12 years agoMake identifier decoding work under all locales
Petri Lehtinen [Mon, 3 Oct 2011 18:35:51 +0000 (21:35 +0300)]
Make identifier decoding work under all locales

Replace isxxx() functions from ctype.h with locale-independent macros.

Fixes GH-35.

12 years agoUse strchr() when searching for a single character
Petri Lehtinen [Mon, 3 Oct 2011 05:52:30 +0000 (08:52 +0300)]
Use strchr() when searching for a single character

12 years agoMake real number encoding and decoding work under all locales
Petri Lehtinen [Sun, 2 Oct 2011 18:27:53 +0000 (21:27 +0300)]
Make real number encoding and decoding work under all locales

The decimal point '.' is changed to locale's decimal point
before/after JSON conversion to make C standard library's
locale-specific string conversion functions work correctly.

All the tests now call setlocale(LC_ALL, "") on startup to use the
locale set in the environment.

Fixes GH-32.