Commit 8cec5296 authored by Sam Thursfield's avatar Sam Thursfield

libtracker-sparql: Don't try to create JSON nodes with unsigned integers

It turns out that json-glib only allows signed integer fields. This
fixes missing values when running `tracker-extract -o json-ld` in
certain cases. If you hit this bug you might also see the following
error:

        Invalid value of type 'guint'
parent c1a57a03
Pipeline #72301 passed with stage
in 2 minutes and 10 seconds
......@@ -1595,6 +1595,10 @@ generate_jsonld_value (const GValue *value,
node = json_node_new (JSON_NODE_VALUE);
json_node_set_string (node, uri);
json_builder_add_value (data->builder, node);
} else if (G_VALUE_HOLDS (value, G_TYPE_UINT)) {
node = json_node_new (JSON_NODE_VALUE);
json_node_set_int (node, g_value_get_uint(value));
json_builder_add_value (data->builder, node);
} else {
node = json_node_new (JSON_NODE_VALUE);
json_node_set_value (node, value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment