Search code examples
pythonvalagobjectobject-persistence

Easy object persistence in Vala (like shelve/pickle)


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.


Solution

  • 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