mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Remove dependency on JSON support
This commit is contained in:
parent
8ce7e61ed7
commit
46664c6494
@ -359,22 +359,6 @@ var CupcakeLocalStorage = function() {
|
||||
);
|
||||
|
||||
}
|
||||
this.setObject = function(key, value) {
|
||||
this.setItem(key, JSON.stringify(value));
|
||||
}
|
||||
|
||||
this.getObject = function(key) {
|
||||
try {
|
||||
var o = this.getItem(key);
|
||||
if(!o) {
|
||||
return false;
|
||||
}
|
||||
return JSON.parse(o);
|
||||
} catch (e) {
|
||||
console.log('bad json ' + o);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
} catch(e) {
|
||||
alert("Database error "+e+".");
|
||||
|
Loading…
Reference in New Issue
Block a user