Code that I’m using for storing the “Task” objects in my GTD app:
var jsonTasks = JSON.stringify( tasks ); localStorage.tasks = jsonTasks;
That’s it. That is quite easy and can’t really think of many languages where you can persist objects with only few lines of code.
Code that I’m using for retrieving objects from storage:
tasks = JSON.parse( localStorage.tasks );
I hope you find this helpful. It works great on Qt Web Runtime running on my Nokia N900.