/json_dom_storage

Adds getJSON and setJSON to the Dom Storage prototype.

Primary LanguageJavaScriptMIT LicenseMIT

JSON Dom Storage

Adds getJSON and setJSON to the Dom Storage prototype.

Example


localStorage.setJSON('user', {
  name: 'kris'
})

localStorage.getJSON('users')  #=> { name: 'kris' }

Or with the sessionStore

</code>  
sessionStorage.setJSON('user', {
  name: 'kris'
})

sessionStorage.getJSON('users')  #=> { name: 'kris' }

Building


rake dist

Running the specs


rake spec

Dependencies

json2

A minified version of json2 is package with the dist.

Homepage

http://github.com/kristopher/json_dom_storage