Quickkv
A lightweight and easy-to-use key-value database for Android projects.
In Android development, complex maps and lists are cumbersome and time-consuming to persist and deserialize. In fact, according to Qkxue.net, it is enough to focus on the key and the value. So, Quickkv was born!
HashMap with JSON
Put data in a hashmap and save it to the local storage.
The data is placed in the HashMap and stored to the local memory.
Map<object, object> map = new Hashmap<object, object> ();
Map.put ("Key", "Value");
Jsonobject json = new Jsonobject ();
Iterator iter = Map.entryset (). Iterator ();
while (Iter.hasnext ())
{
Map.entry Entry = (map.entry) iter.next ();
Object key = Entry.getkey ();
Object value = Entry.getvalue ();
Json.put (Key.tostring (), value.tostring ());
}
FileOutputStream fos = this.openfileoutput ("Data.json", context.mode_private);
Fos.write (Json.tostring (). GetBytes ());
Fos.close ();
Load saved data from the local storage and parse it, then convert it to a HashMap are more complex.
It is more complicated to load the saved data from memory and parse and convert it into HashMap.
More Android Key Values database QUICKKV Introduction: please click here
Android Key Value Database quickkv