[json-glib] reader: "null" is a value
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [json-glib] reader: "null" is a value
- Date: Sat, 27 Oct 2012 11:21:50 +0000 (UTC)
commit 22275bc0c28682e6bd3022d36e0a9301aeb5ce56
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Oct 27 10:52:41 2012 +0100
reader: "null" is a value
Even if we have a special JsonNode for it. The json_reader_is_value()
function should return TRUE for 'null' nodes as well.
json-glib/json-reader.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/json-glib/json-reader.c b/json-glib/json-reader.c
index 441dffc..721f069 100644
--- a/json-glib/json-reader.c
+++ b/json-glib/json-reader.c
@@ -403,7 +403,8 @@ json_reader_is_value (JsonReader *reader)
if (reader->priv->current_node == NULL)
return FALSE;
- return JSON_NODE_HOLDS_VALUE (reader->priv->current_node);
+ return JSON_NODE_HOLDS_VALUE (reader->priv->current_node) ||
+ JSON_NODE_HOLDS_NULL (reader->priv->current_node);
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]