localStorage only supports strings. Use JSON.stringify() and JSON.parse().
--save json in localstorage
--retrive json from localstorage
--save json in localstorage
var hash={}; localStorage['hash']=JSON.stringify(hash);
--retrive json from localstorage
var jsonObj=JSON.parse(localStorage['hash']);