ELing
ELing

Reputation: 259

What is the best way to store JSON data within mobile hybrid app?

There are few options in the market to store some JSON data within mobile app (indexedDB, webSQL, etc.).

I'm looking for the best solution (which is not deprecated and which is honestly supported by commonly used browsers) to store my JSON data and simply use it within the mobile app which is created for the presentation / demo / portfolio purposes.

My static JSON file structure looks as follows:

{
   "products": [
      .. several records
   ],
   "users": [
      ... several records
   ],
   "factData": [
      ... few thousand records
   ]
}

The question is, which technology / method should I use to simply store above JSON data and do not worry about support ?

Upvotes: 1

Views: 1155

Answers (3)

Mecolela
Mecolela

Reputation: 91

You probably should look into pouchdb that not only facilitates json storage on the client but also offline syncing to a couchdb server.

You could look at this FAQ native support

In regards to support you'll also find some more detail on there faq page

Upvotes: 1

user8556290
user8556290

Reputation:

For your question you got many hybride app to play with json data :

Xamarin, PhoneGap, intel XDK, Ionic Framework, Framework 7, Appcelerator Titanium, Mobile Angular UI, Onsen UI, Sencha Touch, Kendo UI, all hybrid frameworks use JavaScript with more and more sensitive logic being put on the client-side so there's a need to focus on client-side security too.

So i didn't tryed all of them but is the actual list of principals app hybrid, so now javascript learning is no a option as 10 years ago :).

Upvotes: 0

Will
Will

Reputation: 46

Local storage provides simple, synchronous key/value pair storage, but Performs poorly with large amounts of data and could possibly lock up UI.

WebSQL is depracated but you can still use it. You can only store around 5MB of data.

IndexedDB is not supported on IOS.

I would probabaly go with WebSQL for now, but I would look into other ways of storing the data in the JSON. Maybe create a database and an API and make authorized REST calls to it

Upvotes: 1

Related Questions