Easy object persistence in Vala (like shelve/pickle)

147 Views Asked by At

I would like to transfer my code from Python to Vala, but i ran into problems.

Is there an easy method to store objects created in Vala, like you can do it with pickle/shelve? I would like to avoid running an entire database.

1

There are 1 best solutions below

0
Jens Mühlenhoff On BEST ANSWER

I don't know shelve/pickle, but have you tried to search for persist or serialize on valadoc?

I did a quick search and found something in the json-glib library:

http://valadoc.org/#!api=json-glib-1.0/Json.gobject_serialize

http://valadoc.org/#!api=json-glib-1.0/Json.gobject_deserialize