move json and localstorage to html5