Added JSON support for local storage