profile/ivi/jansson.git
14 years agoUse Sphinx 1.0, change the HTML theme
Petri Lehtinen [Sun, 5 Sep 2010 19:00:47 +0000 (22:00 +0300)]
Use Sphinx 1.0, change the HTML theme

14 years agoAdd a section describing how to build on Windows
Petri Lehtinen [Sun, 5 Sep 2010 18:38:06 +0000 (21:38 +0300)]
Add a section describing how to build on Windows

14 years agoOn Windows, typedef int to int32_t
Petri Lehtinen [Sun, 5 Sep 2010 18:29:04 +0000 (21:29 +0300)]
On Windows, typedef int to int32_t

There's no inttypes.h or stdint.h in the stdlib on Windows.

14 years agoAdd jansson_config.h.win32
Petri Lehtinen [Sun, 5 Sep 2010 18:21:36 +0000 (21:21 +0300)]
Add jansson_config.h.win32

As the configure script cannot be run on Windows, give the users a
jansson_config.h that they can use directly.

14 years agoMove max() to jansson_private.h, define only if not already defined
Petri Lehtinen [Sun, 5 Sep 2010 17:54:37 +0000 (20:54 +0300)]
Move max() to jansson_private.h, define only if not already defined

On some platforms (Visual C++ for one) the standard library already
defines max() as a macro.

14 years agoDon't use designated struct initializers
Petri Lehtinen [Sun, 5 Sep 2010 14:21:36 +0000 (17:21 +0300)]
Don't use designated struct initializers

It's a C99 feature and not available on all compilers (Visual C++, for
example).

14 years agoUse config.h only if it exists
Petri Lehtinen [Sun, 5 Sep 2010 14:16:47 +0000 (17:16 +0300)]
Use config.h only if it exists

This makes it easier to compile without the configure script (e.g. on
Windows).

14 years agoReplace all occurences of inline with JSON_INLINE
Petri Lehtinen [Sun, 5 Sep 2010 14:13:21 +0000 (17:13 +0300)]
Replace all occurences of inline with JSON_INLINE

This makes it easier to compile without the configure script (e.g. on
Windows).

14 years agoMerge branch '1.3'
Petri Lehtinen [Sat, 14 Aug 2010 18:02:08 +0000 (21:02 +0300)]
Merge branch '1.3'

Conflicts:
doc/apiref.rst
src/jansson_private.h

14 years agoSet the version number to 2.0pre
Petri Lehtinen [Sat, 14 Aug 2010 17:47:08 +0000 (20:47 +0300)]
Set the version number to 2.0pre

14 years agoClarify and document the integer type configuration
Petri Lehtinen [Sat, 14 Aug 2010 17:37:50 +0000 (20:37 +0300)]
Clarify and document the integer type configuration

14 years agoAdd a flags parameter to all decoding functions for future needs
Petri Lehtinen [Fri, 13 Aug 2010 19:19:20 +0000 (22:19 +0300)]
Add a flags parameter to all decoding functions for future needs

As of now, the parameter is unused, but may be needed in the future.
I'm adding it now so that in the future both API and ABI remain
backwards compatible as long as possible.

This is a backwards incompatible change.

14 years agoChange the maximum indentation size to 32 spaces in encoder
Petri Lehtinen [Fri, 13 Aug 2010 19:11:04 +0000 (22:11 +0300)]
Change the maximum indentation size to 32 spaces in encoder

This is to free up bits from the flags parameter of json_dump
functions. I'm pretty sure no-one needs 256 spaces of indentation when
pretty-printing JSON values...

This is a backwards incompatible change.

14 years agoChange the underlying type of JSON integer from long to json_int_t
Petri Lehtinen [Fri, 13 Aug 2010 19:06:01 +0000 (22:06 +0300)]
Change the underlying type of JSON integer from long to json_int_t

json_int_t is typedef'd to long long if it's supported, or long
otherwise. There's also some supporting things, like the
JSON_INTEGER_FORMAT macro that expands to the printf() conversion
specifier that corresponds to json_int_t's actual type.

This is a backwards incompatible change.

14 years agoMake object_key_t portable
Petri Lehtinen [Thu, 12 Aug 2010 18:35:19 +0000 (21:35 +0300)]
Make object_key_t portable

A flexible array member is unportable. Use a table of length 1
instead. This needs some adjustment to the memory allocatio, too.

14 years agoBeautify the container_of macro
Petri Lehtinen [Thu, 12 Aug 2010 18:34:02 +0000 (21:34 +0300)]
Beautify the container_of macro

Use offsetof instead of zero pointer dereference trickery.

14 years agoReplace inline with JSON_INLINE in json_object_iter_set() declaration
Petri Lehtinen [Thu, 12 Aug 2010 18:10:12 +0000 (21:10 +0300)]
Replace inline with JSON_INLINE in json_object_iter_set() declaration

14 years agoCheck for gcc before setting gcc specific CFLAGS
Petri Lehtinen [Thu, 12 Aug 2010 17:59:48 +0000 (20:59 +0300)]
Check for gcc before setting gcc specific CFLAGS

14 years agoMove site configuration to jansson_config.h
Petri Lehtinen [Tue, 10 Aug 2010 19:14:37 +0000 (22:14 +0300)]
Move site configuration to jansson_config.h

This way, more site configuration can be more easily added later.

14 years agoChange JSON integer's underlying type from int to long
Petri Lehtinen [Tue, 10 Aug 2010 18:45:18 +0000 (21:45 +0300)]
Change JSON integer's underlying type from int to long

This is a backwards incompatible change.

14 years agoClarify the documentation
Petri Lehtinen [Wed, 16 Jun 2010 18:34:10 +0000 (21:34 +0300)]
Clarify the documentation

Couple some string and number information from the RFC conformance
chapter in the API reference, and refer to the RFC conformance chapter
from API reference for more information.

Also, state more clearly that a JSON text must have an array or object
as the top-level value, and better document the string comparison
performed by json_equal().

14 years agoUnify unsigned integer usage in the API
Petri Lehtinen [Tue, 15 Jun 2010 12:27:35 +0000 (15:27 +0300)]
Unify unsigned integer usage in the API

Replace all occurences of unsigned int and unsigned long with size_t.

This is a backwards incompatible change, as the signature of many API
functions changes.

14 years agoconfigure.ac: Remove unneeded AC_PROG_CXX
Petri Lehtinen [Mon, 14 Jun 2010 19:30:15 +0000 (22:30 +0300)]
configure.ac: Remove unneeded AC_PROG_CXX

14 years agoAdd a few missing changes to CHANGES for v1.3
Petri Lehtinen [Mon, 14 Jun 2010 11:33:44 +0000 (14:33 +0300)]
Add a few missing changes to CHANGES for v1.3

These were forgotten when releasing.

14 years agojansson 1.3
Petri Lehtinen [Sun, 13 Jun 2010 17:37:33 +0000 (20:37 +0300)]
jansson 1.3

14 years agoRemove the C++ interface
Petri Lehtinen [Sat, 12 Jun 2010 17:45:19 +0000 (20:45 +0300)]
Remove the C++ interface

14 years agoMerge branch '1.2'
Petri Lehtinen [Sat, 12 Jun 2010 19:44:21 +0000 (22:44 +0300)]
Merge branch '1.2'

14 years agoFix a few memory leaks in tests
Petri Lehtinen [Thu, 10 Jun 2010 18:15:43 +0000 (21:15 +0300)]
Fix a few memory leaks in tests

No changes to the actual library code.

14 years agoMerge branch '1.2'
Petri Lehtinen [Thu, 20 May 2010 15:47:30 +0000 (18:47 +0300)]
Merge branch '1.2'

14 years agoClarify the documentation on reference stealing
Petri Lehtinen [Thu, 20 May 2010 15:45:06 +0000 (18:45 +0300)]
Clarify the documentation on reference stealing

Provide an example usage pattern for reference stealing functions.
This way the user (hopely) sees more clearly how the reference
stealing functions are meant to be used.

14 years agoZero the visited flag after an encoding error
Petri Lehtinen [Fri, 14 May 2010 05:47:24 +0000 (08:47 +0300)]
Zero the visited flag after an encoding error

When encoding an array or object ends in an error, the visited flag
wasn't zeroed, causing subsequent encoding attempts to fail. This
patch fixes the problem by always zeroing the visited flag.

14 years agoZero the visited flag after encoding an empty array or object
Petri Lehtinen [Wed, 12 May 2010 12:41:09 +0000 (15:41 +0300)]
Zero the visited flag after encoding an empty array or object

Encoding an empty array or object worked, but encoding it again
(possibly after adding some items) failed, because the visited flag
(used for detecting circular references) wasn't zeroed.

14 years agoMerge branch '1.2'
Petri Lehtinen [Fri, 7 May 2010 04:36:01 +0000 (07:36 +0300)]
Merge branch '1.2'

14 years agoload.c: Make stream_init() static
Petri Lehtinen [Fri, 7 May 2010 04:35:11 +0000 (07:35 +0300)]
load.c: Make stream_init() static

14 years agoMerge branch '1.2'
Petri Lehtinen [Sat, 3 Apr 2010 11:00:59 +0000 (14:00 +0300)]
Merge branch '1.2'

Conflicts:
CHANGES
configure.ac
doc/conf.py

14 years agojansson 1.2.1
Petri Lehtinen [Sat, 3 Apr 2010 10:39:16 +0000 (13:39 +0300)]
jansson 1.2.1

14 years agodoc: Distribute conformance.rst
Petri Lehtinen [Sat, 3 Apr 2010 10:49:38 +0000 (13:49 +0300)]
doc: Distribute conformance.rst

14 years agoMerge branch '1.2'
Petri Lehtinen [Sun, 28 Mar 2010 18:44:41 +0000 (21:44 +0300)]
Merge branch '1.2'

Conflicts:
configure.ac

14 years agoRequire autoconf 2.60
Petri Lehtinen [Sun, 28 Mar 2010 18:16:21 +0000 (21:16 +0300)]
Require autoconf 2.60

The AC_TYPE_INT32_T macro first appeared in autoconf 2.60.

14 years agoSupport compilers that don't have the "inline" keyword
Petri Lehtinen [Sun, 28 Mar 2010 18:14:08 +0000 (21:14 +0300)]
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.

14 years agodoc: Add chapter on RFC conformance
Petri Lehtinen [Fri, 26 Mar 2010 20:00:41 +0000 (22:00 +0200)]
doc: Add chapter on RFC conformance

Thanks to Deron Meranda for providing the initial text.

14 years agoEstimate real number underflows with 0.0
Petri Lehtinen [Fri, 26 Mar 2010 19:59:53 +0000 (21:59 +0200)]
Estimate real number underflows with 0.0

Earlier it was a decoding error.

14 years agoEnhance tests for null byte
Petri Lehtinen [Fri, 26 Mar 2010 19:29:31 +0000 (21:29 +0200)]
Enhance tests for null byte

14 years agoMerge branch '1.2'
Petri Lehtinen [Tue, 23 Mar 2010 06:15:19 +0000 (08:15 +0200)]
Merge branch '1.2'

14 years agoFix reference counting on true, false and null
Petri Lehtinen [Tue, 23 Mar 2010 06:08:57 +0000 (08:08 +0200)]
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.

14 years agoIgnore temporary files *~
Petri Lehtinen [Fri, 19 Mar 2010 06:11:48 +0000 (08:11 +0200)]
Ignore temporary files *~

14 years agoc++ wrapper: add missing 'inline' statements to various constructors
Andres Freund [Thu, 18 Mar 2010 13:35:09 +0000 (14:35 +0100)]
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.

14 years agoDon't include stdint.h anywhere
Petri Lehtinen [Thu, 18 Mar 2010 05:18:43 +0000 (07:18 +0200)]
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.

14 years agohashtable: Fix typo in comment
Petri Lehtinen [Thu, 11 Feb 2010 19:17:19 +0000 (21:17 +0200)]
hashtable: Fix typo in comment

14 years agoMerge branch 'c++-enhance-proxies'
Petri Lehtinen [Thu, 11 Feb 2010 19:06:19 +0000 (21:06 +0200)]
Merge branch 'c++-enhance-proxies'

14 years agoUpdate CHANGES, change version to 1.2+
Petri Lehtinen [Thu, 11 Feb 2010 18:55:56 +0000 (20:55 +0200)]
Update CHANGES, change version to 1.2+

14 years agoImplement JSON_PRESERVE_ORDER encoding flag
Petri Lehtinen [Tue, 9 Feb 2010 19:29:33 +0000 (21:29 +0200)]
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.

14 years agoOptimize hashtable_set()
Petri Lehtinen [Tue, 9 Feb 2010 18:51:25 +0000 (20:51 +0200)]
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.

14 years agoC++: Optimize PropertyProxy
Petri Lehtinen [Mon, 8 Feb 2010 18:51:09 +0000 (20:51 +0200)]
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.

14 years agoC++: Make proxies safer
Petri Lehtinen [Sun, 7 Feb 2010 12:08:54 +0000 (14:08 +0200)]
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.

14 years agoMake int32_t available on all systems
Petri Lehtinen [Sat, 6 Feb 2010 19:08:56 +0000 (21:08 +0200)]
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.

14 years agoMerge branch '1.2'
Petri Lehtinen [Thu, 4 Feb 2010 19:13:57 +0000 (21:13 +0200)]
Merge branch '1.2'

Conflicts:
LICENSE

14 years agoMerge branch 'cleanup-c++-code'
Petri Lehtinen [Thu, 4 Feb 2010 19:12:36 +0000 (21:12 +0200)]
Merge branch 'cleanup-c++-code'

14 years agoC++: Fix test_cpp.cpp to work with VPATH builds
Petri Lehtinen [Thu, 4 Feb 2010 19:10:04 +0000 (21:10 +0200)]
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.

14 years agoC++: Add Value::dump_file(), load_file() and loads() that take an std::string
Petri Lehtinen [Thu, 4 Feb 2010 19:07:02 +0000 (21:07 +0200)]
C++: Add Value::dump_file(), load_file() and loads() that take an std::string

14 years agoC++: Rename some functions to better match the C API
Petri Lehtinen [Thu, 4 Feb 2010 19:02:35 +0000 (21:02 +0200)]
C++: Rename some functions to better match the C API

Value::save_file -> Value::dump_file
Value::save_string -> Value::dumps
load_string -> loads

14 years agoC++: #include <cstdio> in jansson.hpp
Petri Lehtinen [Thu, 4 Feb 2010 18:50:01 +0000 (20:50 +0200)]
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.

14 years agoC++: Rename test.json to test_cpp.json
Petri Lehtinen [Thu, 4 Feb 2010 18:49:01 +0000 (20:49 +0200)]
C++: Rename test.json to test_cpp.json

14 years agoAdd year 2010 to copyright notices
Petri Lehtinen [Tue, 2 Feb 2010 19:26:11 +0000 (21:26 +0200)]
Add year 2010 to copyright notices

14 years agoAdd myself as another copyright holder for jansson.hpp and jansson.ipp
Petri Lehtinen [Tue, 2 Feb 2010 19:14:31 +0000 (21:14 +0200)]
Add myself as another copyright holder for jansson.hpp and jansson.ipp

14 years agoC++: Rename jansson-impl.hpp to jansson.ipp
Petri Lehtinen [Tue, 2 Feb 2010 19:10:57 +0000 (21:10 +0200)]
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().

14 years agoC++: Rename namespace json::_private to json::detail
Petri Lehtinen [Tue, 2 Feb 2010 19:01:50 +0000 (21:01 +0200)]
C++: Rename namespace json::_private to json::detail

14 years agoC++: Untabify, reindent, delete trailing whitespace
Petri Lehtinen [Tue, 2 Feb 2010 18:59:23 +0000 (20:59 +0200)]
C++: Untabify, reindent, delete trailing whitespace

14 years agotest/suites/api: Detect tests correctly
Petri Lehtinen [Tue, 2 Feb 2010 18:37:00 +0000 (20:37 +0200)]
test/suites/api: Detect tests correctly

The C++ test case didn't work correctly in VPATH builds or with
VALGRIND=1.

14 years agoAdd functions json_object_iter_{at,set,set_new}
Petri Lehtinen [Mon, 1 Feb 2010 19:01:24 +0000 (21:01 +0200)]
Add functions json_object_iter_{at,set,set_new}

14 years agoMerge branch '1.2'
Petri Lehtinen [Thu, 28 Jan 2010 19:05:19 +0000 (21:05 +0200)]
Merge branch '1.2'

14 years agotest/suites/api/test_object.c: Enhance tests for iterators
Petri Lehtinen [Thu, 28 Jan 2010 19:04:21 +0000 (21:04 +0200)]
test/suites/api/test_object.c: Enhance tests for iterators

14 years agotest/suites/api: Fail when a test fails
Petri Lehtinen [Thu, 28 Jan 2010 18:58:25 +0000 (20:58 +0200)]
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.

14 years agorun-tests.sh: Print the test name correctly when VERBOSE=1
Petri Lehtinen [Thu, 28 Jan 2010 18:57:52 +0000 (20:57 +0200)]
run-tests.sh: Print the test name correctly when VERBOSE=1

14 years agodoc/Makefile.am: Don't remove changes.rst in clean
Petri Lehtinen [Tue, 26 Jan 2010 19:19:48 +0000 (21:19 +0200)]
doc/Makefile.am: Don't remove changes.rst in clean

14 years agoUpdate LICENSE
Petri Lehtinen [Thu, 21 Jan 2010 20:31:06 +0000 (22:31 +0200)]
Update LICENSE

14 years agoMerge branch 'c++-api'
Petri Lehtinen [Thu, 21 Jan 2010 20:29:26 +0000 (22:29 +0200)]
Merge branch 'c++-api'

14 years agojansson 1.2
Petri Lehtinen [Thu, 21 Jan 2010 19:07:14 +0000 (21:07 +0200)]
jansson 1.2

14 years agotest/run-suites: Be less picky when searching for tests
Petri Lehtinen [Thu, 21 Jan 2010 18:59:56 +0000 (20:59 +0200)]
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.

14 years agoDistribute some missing files
Petri Lehtinen [Thu, 21 Jan 2010 18:59:17 +0000 (20:59 +0200)]
Distribute some missing files

14 years agoRemove CHANGES preprocessing, as it didn't work with VPATH builds
Petri Lehtinen [Thu, 21 Jan 2010 18:53:05 +0000 (20:53 +0200)]
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.

14 years agoCHANGES: Update for v1.2
Petri Lehtinen [Tue, 19 Jan 2010 19:19:37 +0000 (21:19 +0200)]
CHANGES: Update for v1.2

14 years agoadd meaningful copyright to jansson-impl.hpp too
Sean Middleditch [Tue, 19 Jan 2010 05:55:41 +0000 (21:55 -0800)]
add meaningful copyright to jansson-impl.hpp too

14 years agoadd meaningful copyright to jansson.hpp
Sean Middleditch [Tue, 19 Jan 2010 05:55:25 +0000 (21:55 -0800)]
add meaningful copyright to jansson.hpp

14 years agointegrate jansson.hpp into build and test suite
Sean Middleditch [Tue, 19 Jan 2010 05:36:02 +0000 (21:36 -0800)]
integrate jansson.hpp into build and test suite

14 years agoMerge branch 'master' of /home/elanthis/Source/janssonxx
Sean Middleditch [Tue, 19 Jan 2010 05:26:10 +0000 (21:26 -0800)]
Merge branch 'master' of /home/elanthis/Source/janssonxx

Conflicts:
.gitignore

14 years agoreplace json::from() with explicit Value() constructors
Sean Middleditch [Tue, 19 Jan 2010 03:24:25 +0000 (19:24 -0800)]
replace json::from() with explicit Value() constructors

14 years agomove static functions out of Value, add test driver to ensure linking works properly
Sean Middleditch [Tue, 19 Jan 2010 02:50:13 +0000 (18:50 -0800)]
move static functions out of Value, add test driver to ensure linking works properly

14 years agorename jansson namespace to json
Sean Middleditch [Tue, 19 Jan 2010 02:37:13 +0000 (18:37 -0800)]
rename jansson namespace to json

14 years agoMerge branch '1.1'
Petri Lehtinen [Sun, 17 Jan 2010 11:57:20 +0000 (13:57 +0200)]
Merge branch '1.1'

Conflicts:
Makefile.am

14 years agorename files to match upstream's preferences
Sean Middleditch [Sun, 17 Jan 2010 04:27:13 +0000 (20:27 -0800)]
rename files to match upstream's preferences

14 years agoadd comments noting inefficiency of stream ops
Sean Middleditch [Sun, 17 Jan 2010 04:21:52 +0000 (20:21 -0800)]
add comments noting inefficiency of stream ops

14 years agoadded a couple minor comments
Sean Middleditch [Sun, 17 Jan 2010 04:17:48 +0000 (20:17 -0800)]
added a couple minor comments

14 years agocleanup code
Sean Middleditch [Sun, 17 Jan 2010 04:15:33 +0000 (20:15 -0800)]
cleanup code

14 years agorename ArrayProxy to ElementProxy and ObjectProxy to PropertyProxy
Sean Middleditch [Sat, 16 Jan 2010 09:40:16 +0000 (01:40 -0800)]
rename ArrayProxy to ElementProxy and ObjectProxy to PropertyProxy

14 years agorename and move the _* private classes to _private namespace
Sean Middleditch [Sat, 16 Jan 2010 09:36:13 +0000 (01:36 -0800)]
rename and move the _* private classes to _private namespace

14 years agoadd object property proxy support
Sean Middleditch [Sat, 16 Jan 2010 09:31:37 +0000 (01:31 -0800)]
add object property proxy support

14 years agoadd array element proxy support
Sean Middleditch [Sat, 16 Jan 2010 09:24:27 +0000 (01:24 -0800)]
add array element proxy support

14 years agotemplatize janssonxx functionality to prepare for proxy setters
Sean Middleditch [Sat, 16 Jan 2010 09:13:19 +0000 (01:13 -0800)]
templatize janssonxx functionality to prepare for proxy setters

14 years agodoc: Convert CHANGES to reStructuredText and add it to HTML docs
Petri Lehtinen [Tue, 12 Jan 2010 19:58:52 +0000 (21:58 +0200)]
doc: Convert CHANGES to reStructuredText and add it to HTML docs

CHANGES is preprocessed to convert json_*() function names to Sphinx
:cfunc: cross references. This is to keep CHANGES more readable in
both plain text and HTML.