Edit in JSFiddle

//http://www.jermywells.com

var o = {
    name: "My Super Sweet Object",
    bool: true
};

//show stringified o object
document.getElementById('rawObject')
    .innerHTML = JSON.stringify(o);

//show typeof o
document.getElementById('rawObjectTypeOf')
    .innerHTML = typeof o;

//set the mySuperObject member of localStorage to the 
//               STRINGIFIED 'o' instance --
localStorage.mySuperObject = JSON.stringify(o);

//show the raw localStorage.mySuperObject value
document.getElementById('localStorageObject')
    .innerHTML = localStorage.mySuperObject;

//show the typeof localStorage.mySuperObject
document.getElementById('localStorageObjectTypeOf')
    .innerHTML = typeof localStorage.mySuperObject;

//parse json from json stringified localStorage variable BACK INTO an object
var mySuperObject = JSON.parse(localStorage.mySuperObject);

//show that the mySuperObject var contains useful object data
document.getElementById('name').innerHTML = mySuperObject.name;
document.getElementById('bool').innerHTML = mySuperObject.bool;
document.getElementById('mySuperType').innerHTML =  typeof mySuperObject;
raw object: <span id="rawObject"></span>
<br />local storage object: <span id="localStorageObject"></span>
<br />
<br />raw object typeof: <span id="rawObjectTypeOf"></span>
<br />local storage object typeof: <span id="localStorageObjectTypeOf"></span>
<br />
<br />localStorage.mySuperObject.name: <span id="name"></span>
<br />localStorage.mySuperObject.bool: <span id="bool"></span>
<br />typeof mySuperObject: <span id="mySuperType"></span>
span {
    color:gray;
}