Lydia : Database or JSON?

Words
176
Reading
1 min
Listen
Play
8y

DroidScript-logo_300x300.png


In DroidScript, there is a native SQlite function. But there is no JSON writing or parsing function.


function test(display) {
// file to store data var fil="/storage/jsontest.txt"; //build a test object var stuff1 = {"value":1,"name":"one"};
//save object in a file writeAsJson(fil,stuff1);
//get copy of the object from the file var newobj = readAsJson(fil);
//display data from the copy display.SetText(newobj.name +" is "+ newobj.value); }

Someone pointed me to a snippet that shows how to simply write a single item JSON file, but there's a lot of tedium in that process. The database may be much simpler even if it is a little heavy on various resources.

As usual I have set myself a larger project than I can realistically handle. But I have time to pick away at this until it's done. So I'm moving forward. Today's progress was mostly reproducing the work I did in Tasker, and a little bit trying to write JSON. Tomorrow I might see what it's like working with databases. I do remember a little bit of db stuff... I think...

Lydia : Database or JSON? | Ecency