I have a question. What is the difference between Variant.to_object and just Object, because it returns a normal gobject, but the following function gives different results in these cases.
works fine
public void add_from_object(Value obj, string tableName=""){
string json_data = Json.gobject_to_data(obj.get_object(),null);
message(json_data);
add(json_data, tableName);
}
get empty usuall obj
public void add_from_object(Object obj, string tableName=""){
string json_data = Json.gobject_to_data(obj,null);
message(json_data);
add(json_data, tableName);
}
call side:
db.add_from_object(new TestClass("test", 5, true));
I understand that I do not have to see the fields of the object because they are not in the cast to the normal Object. What then is the difference between the method through Value.
pss(Yes I do the ability to add Data objects to sqlite, Yes Data there are no data objects in Vala, I took this from Kotlin.)
Is Value.to_object retrns just reference on GObject?