diff options
Diffstat (limited to 'json-glib/json-gobject.c')
| -rw-r--r-- | json-glib/json-gobject.c | 24 | 
1 files changed, 12 insertions, 12 deletions
| diff --git a/json-glib/json-gobject.c b/json-glib/json-gobject.c index 6913537..1b198ca 100644 --- a/json-glib/json-gobject.c +++ b/json-glib/json-gobject.c @@ -341,16 +341,6 @@ json_serialize_pspec (const GValue *real_value,        g_value_unset (&value);        break; -    case G_TYPE_INT: -      retval = json_node_new (JSON_NODE_VALUE); -      json_node_set_int (retval, g_value_get_int (real_value)); -      break; - -    case G_TYPE_FLOAT: -      retval = json_node_new (JSON_NODE_VALUE); -      json_node_set_double (retval, g_value_get_float (real_value)); -      break; -      case G_TYPE_STRING:        /* strings might be NULL */        if (!g_value_get_string (real_value)) @@ -363,6 +353,16 @@ json_serialize_pspec (const GValue *real_value,          }        break; +    case G_TYPE_INT: +      retval = json_node_new (JSON_NODE_VALUE); +      json_node_set_int (retval, g_value_get_int (real_value)); +      break; + +    case G_TYPE_FLOAT: +      retval = json_node_new (JSON_NODE_VALUE); +      json_node_set_double (retval, g_value_get_float (real_value)); +      break; +      case G_TYPE_BOXED:        if (G_VALUE_HOLDS (real_value, G_TYPE_STRV))          { @@ -449,7 +449,7 @@ json_serialize_pspec (const GValue *real_value,   * Asks a #JsonSerializable implementation to serialize a #GObject   * property into a #JsonNode object.   * - * Return value: a #JsonNode containing the serialize property + * Return value: a #JsonNode containing the serialized property   */  JsonNode *  json_serializable_serialize_property (JsonSerializable *serializable, @@ -695,7 +695,7 @@ json_construct_gobject (GType         gtype,  /**   * json_serialize_gobject:   * @gobject: a #GObject - * @length: return value for the length of the buffer, or %NULL + * @length: (out): return value for the length of the buffer, or %NULL   *   * Serializes a #GObject into a JSON data stream. If @gobject implements   * the #JsonSerializableIface interface, it will be asked to serizalize all | 
