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 IBM MobileFirst™ Platform Foundation, and enables persistent storage of JSON documents. Documents in an application are available in JSONStore even when the device that is 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 Cordova applications, see WL.JSONStore in the API reference section. Cordova applications are supported for iOS, Android, Windows 10 Universal Windows Platform and Windows 8 Universal.
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.
Compare JSONStore features to those features of other data storage technologies and formats.
JSONStore is a JavaScript API for storing data inside Cordova applications that use the MobileFirst plug-in, 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, and Cordova File API. The table shows how some features that are provided by JSONStore compare with other technologies. The JSONStore feature is only available on iOS and Android devices and simulators.
JSONStore | LocalStorage | IndexedDB | Cordova Storage | Cordova File | |
---|---|---|---|---|---|
Android Support (Cordova & Native Applications) | ✔ | ✔ | ✔ | ✔ | ✔ |
iOS Support (Cordova & Native Applications) | ✔ | ✔ | ✔ | ✔ | ✔ |
Windows 10 Universal Windows Platform and Windows 8 Universal (Cordova Applications) | ✔ | ✔ | ✔ | - | ✔ |
Data encryption | ✔ | - | - | - | - |
Maximum Storage | Available Space | ~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 | JSON Documents | Relational (SQL) | Strings |