[json-glib] array: Do not create a null node for empty strings



commit f7eb50b5b03ee5870e476135bd989cb49d8d44c2
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Tue Aug 18 14:04:05 2015 +0100

    array: Do not create a null node for empty strings
    
    The two are fairly different, and JsonObject does not behave this way.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=730803

 json-glib/json-array.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/json-glib/json-array.c b/json-glib/json-array.c
index c747989..ebc6d58 100644
--- a/json-glib/json-array.c
+++ b/json-glib/json-array.c
@@ -551,7 +551,7 @@ json_array_add_string_element (JsonArray   *array,
 
   node = json_node_alloc ();
 
-  if (value != NULL && *value != '\0')
+  if (value != NULL)
     json_node_init_string (node, value);
   else
     json_node_init_null (node);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]