0

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.

Jens Mühlenhoff
  • 14,565
  • 6
  • 56
  • 113
fahrradflucht
  • 1,563
  • 3
  • 14
  • 22
  • Welcome to stackoverflow! Technically this question is against the rules, because you are asking for a library here: http://stackoverflow.com/help/on-topic – Jens Mühlenhoff Feb 06 '15 at 09:23
  • I have given you an answer anyway, but my answer is more to the question of "How can i find Vala libraries / API methods?". – Jens Mühlenhoff Feb 06 '15 at 09:24
  • Also your question title should be phrased as a question, like "How can I persist GObject objects to a file?" or something like this. – Jens Mühlenhoff Feb 06 '15 at 09:26

1 Answers1

1

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

Jens Mühlenhoff
  • 14,565
  • 6
  • 56
  • 113