commit c1c691fc6b58a990ee9bb17504189064051d5a12 Author: Emmanuele Bassi Date: Wed Aug 12 13:56:08 2009 +0100 [release] 0.7.4 configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 12bc49ea08c50da9a7ed53c475fe873421432ebe Author: Emmanuele Bassi Date: Wed Aug 12 14:01:49 2009 +0100 Update the NEWS file NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit 75b888c26eebf7784c5af045a8c6af353e56b2e9 Author: Emmanuele Bassi Date: Wed Aug 12 13:59:52 2009 +0100 [build] Use our libtool for the typelib When compiling the GIR into a .typelib file we can use our own libtool script; shave will proxy it to the right place. json-glib/Makefile.am | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) commit d84c0f367b06e094ff693d60a724b9f141c33ca9 Author: Emmanuele Bassi Date: Wed Aug 12 13:48:17 2009 +0100 Disallow single header file inclusion The correct header file for JSON-GLib is, and has always been, json-glib.h. Anything else was not supported, as we've been moving around stuff for a while, now. This commit enforces the single include file, using the same policy enacted by other libraries, like: GLib, GTK+ and Clutter. json-glib/json-enum-types.h.in | 4 ++++ json-glib/json-generator.h | 4 ++++ json-glib/json-glib.h | 6 ++++++ json-glib/json-parser.h | 4 ++++ json-glib/json-types.h | 4 ++++ json-glib/json-version.h.in | 4 ++++ 6 files changed, 26 insertions(+), 0 deletions(-) commit 3adba015e1c1f9edc7b7b2c4364d65f813216225 Author: Emmanuele Bassi Date: Wed Aug 12 13:46:46 2009 +0100 [introspection] Use json-gobject.h The json-gobject.h header file includes json-glib.h and all the GObject-related serialization and deserialization API; we assume that if you want introspection you should be using this header and not the plain json-glib.h. json-glib/Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit a9386e20bf8e16e17a89dda24781c63bf495aa97 Author: Emmanuele Bassi Date: Wed Aug 12 13:46:05 2009 +0100 [tests] Include json-glib.h Do not include json-types.h, use the correct global include. json-glib/tests/array-test.c | 2 +- json-glib/tests/node-test.c | 2 +- json-glib/tests/object-test.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 8a7e0f381dc7e49745680df92ebb428f18bf4832 Author: Emmanuele Bassi Date: Wed Aug 12 12:29:34 2009 +0100 Do not sanitize the object member's name JsonObject sanitizes the name of the member to replace all characters defined by G_STR_DELIMITERS with '_'. This is absolutely brain damaged, since a member name can be any valid JSON string. Obviously, if a member name maps to a GObject property is entirely up to the GObject code to decide whether to sanitize the member name or not. json-glib/json-object.c | 35 ++++++----------------------------- 1 files changed, 6 insertions(+), 29 deletions(-) commit ad638149c2cc1a17c0d2ad1482d932c8940c64e0 Author: Emmanuele Bassi Date: Wed Aug 12 12:22:44 2009 +0100 Update NEWS NEWS | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) commit d87b18675ac02f42be23bf4070134690b8b9934b Author: Emmanuele Bassi Date: Wed Aug 12 12:13:11 2009 +0100 Auto-promote integer types to G_TYPE_INT64 The JSON RFC does not specify the size of the integer type, thus implicitly falling back to machine-size. This would all be fine and dandy if some demented Web Developer (and I use the term "developer" *very much* loosely) did not decide to use integers to store unique identifiers for objects; obviously, you can't have more than 2^32-1 status messages in a database with millions of users who update their status multiple times per day. Right, Twitter? Anyway, some languages do a type auto-promotion from Integer to Long, thus pushing the limit of allowed positive values -- until the next integer overflow, that is. C, and GLib, do not do that transparently for us so we need to: - always use gint64 when parsing a JSON data stream using JsonScanner - move all the Node, Object and Array APIs to gint64 - auto-promote G_TYPE_INT to G_TYPE_INT64 when setting a GValue manually - auto-promote and auto-demote G_TYPE_INT properties when (de)serializing GObjects. The GLib types used internally by JSON-GLib are, thus: integer -> G_TYPE_INT64 boolean -> G_TYPE_BOOLEAN float -> G_TYPE_DOUBLE string -> G_TYPE_STRING json-glib/json-array.c | 4 +- json-glib/json-generator.c | 4 +- json-glib/json-gobject.c | 58 ++++++++++++++++++++++++++++++--------- json-glib/json-node.c | 61 +++++++++++++++++++++++++++++++++-------- json-glib/json-object.c | 4 +- json-glib/json-types.h | 12 ++++---- json-glib/tests/array-test.c | 2 +- json-glib/tests/node-test.c | 14 +++++----- json-glib/tests/object-test.c | 2 +- tests/test-generator.c | 4 +- tests/test-parser.c | 4 +- tests/test-serialize-full.c | 9 +----- 12 files changed, 121 insertions(+), 57 deletions(-) commit 7411cadc0fdd9ffc2bd7004c9980913ac857a495 Author: Emmanuele Bassi Date: Sun Jun 28 23:52:34 2009 +0100 Indentation fixes tests/test-parser.c | 98 +++++++++++++++++++++++++------------------------- 1 files changed, 49 insertions(+), 49 deletions(-) commit 112a8ec8dfd9c46304008b62e8ab256ed7714644 Author: Emmanuele Bassi Date: Sun Jun 28 23:49:51 2009 +0100 [parser] Advance the tokenizer to avoid an infinite loop The tokenizer is not advanced when we peek a base value and return. This causes an endless loop which terminates only if the OOM killer in the kernel gets the right process. Thanks to Thomas Weidner for catching and reporting the issue. json-glib/json-parser.c | 16 +++++++++++----- 1 files changed, 11 insertions(+), 5 deletions(-) commit 4ecdd6bedb7961f3a33971aa1f2338115a60f7f3 Author: Emmanuele Bassi Date: Sun Jun 28 23:48:36 2009 +0100 [tests] Verify parsing base values A JSON document containing just a base value (null, true/false, an integer, a floating point value or a string) is still a valid JSON document, and JsonParser must create the correct JsonNode. tests/test-parser.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 59 insertions(+), 0 deletions(-) commit 9a3b7a020716e23f1330915f1768a7c00bffbeb5 Author: Emmanuele Bassi Date: Thu Jun 25 10:37:43 2009 +0100 [docs] Fix typo in JsonObject::set_object_member() The passed value is a pointer to a JsonObject, not to a JsonArray. json-glib/json-object.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 68d872f15022217c0ff1cf516aec917d600fd762 Author: Rodrigo Moya Date: Wed Jun 24 14:07:18 2009 +0200 Use JSON_NODE_OBJECT, not JSON_NODE_ARRAY when creating the node in json_object_set_object_member Reviewed by Emmanuele Bassi json-glib/json-object.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) commit 6e706fb2b7a371f25c169ed25d4b617f2dc05b63 Author: Emmanuele Bassi Date: Sun Jun 21 10:58:24 2009 +0100 [generator] Pre-compute the escape table Instead of allocating the escape table to be used with g_strescape() for each string we can have it unrolled already in code. Thanks to: Christian Persch Fixes bug: http://bugzilla.openedhand.com/show_bug.cgi?id=1648 json-glib/json-generator.c | 43 +++++++++++++++++++++++++++++++++---------- 1 files changed, 33 insertions(+), 10 deletions(-) commit a9416b7e2823f1fffe639d90bb352a337815a70e Author: Emmanuele Bassi Date: Thu Jun 18 11:23:56 2009 +0100 Post-release bump to 0.7.3 configure.ac | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)