LocalStorage API with automatic JSON support