Lydia : Database or JSON?

in programming •  6 years ago 


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...

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hello! Your post has been resteemed and upvoted by @ilovecoding because we love coding! Keep up good work! Consider upvoting this comment to support the @ilovecoding and increase your future rewards! ^_^ Steem On!

Reply !stop to disable the comment. Thanks!

Congratulations @baerdric! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

Award for the number of posts published

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

Do not miss the last post from @steemitboard:

SteemFest³ - SteemitBoard support the Travel Reimbursement Fund.

Support SteemitBoard's project! Vote for its witness and get one more award!