+

Search Tips   |   Advanced Search

JSONStore overview

JSONStore features add the ability to store JSON documents in MobileFirst applications.

JSONStore is a lightweight, document-oriented storage system that is included as a feature of MPF, and enables persistent storage of JSON documents. Documents in an application are available in JSONStore even when the device running the application is offline. This persistent, always-available storage can be useful for customers, employees, or partners, to give them access to documents when, for example, there is no network connection to the device.

For JSONStore API reference information for hybrid applications, see WL.JSONStore in the API reference section. Hybrid applications are supported for iOS, Android, Windows 8, and Windows 8 Phone.

For JSONStore API reference information for native iOS applications, see the JSONStore Class Reference in the API reference section.

For JSONStore API reference information for native Android applications, see the com.worklight.jsonstore.api Package in the API reference section.

Here is a high-level summary of what JSONStore provides:

A single store can have many collections, and each collection can have many documents. It is also possible to have a MobileFirst application containing multiple stores. For information, see JSONStore multiple user support.

Figure 1. A basic graphic representation of JSONStore.

Figure 2. Components and their interaction with the server when we use JSONStore for data synchronization.

Because it is familiar to developers, relational database terminology is used in this documentation at times to help explain JSONStore. There are many differences between a relational database and JSONStore however. For example, the strict schema used to store data in relational databases is different from JSONStore's approach. With JSONStore, we can store any JSON content, and index the content that we need to search.


Features table

Compare JSONStore features to those features of other data storage technologies and formats.

JSONStore is a JavaScript API for storing data inside hybrid MobileFirst applications, an Objective-C API for native iOS applications, and a Java API for native Android applications. For reference, here is a comparison of different JavaScript storage technologies to see how JSONStore compares to them.

JSONStore is similar to technologies such as LocalStorage, Indexed DB, Cordova Storage API, Cordova File API, and MobileFirst Encrypted Cache. The table shows how some features provided by JSONStore compare with other technologies. The JSONStore feature is only available on iOS and Android devices and simulators.

JSONStore Encrypted Cache LocalStorage IndexedDB Cordova Storage Cordova File
Android Support (Hyrbid & Native Applications)
iOS Support (Hybrid & Native Applications)
Windows 8 and Windows 8 Phone Support -
Web Dev Only (See Note 1) - -
Data encryption - - - -
Maximum Storage Available Space ~5 MB ~5 MB >5 MB Available Space Available Space
Reliable Storage (See Note 2) - - -
Keep Track of Local Changes - - - - -
Multi-user support - - - - -
Indexing - - -
Type of Storage JSON Documents Key/Value Pairs Key/Value Pairs JSON Documents Relational (SQL) Strings

1. Dev Only means designed only for development, with no security features and a ~5 MB storage space limit.

2. Reliable Storage means that the data is not deleted unless one of the following events occurs:


Parent topic: JSONStore