improve support for default values when using JSON with localstorage