// requires: https://github.com/douglascrockford/JSON-js/raw/master/json2.js

{
	saveJson: function(key, json) {
		localStorage[key] = JSON.stringify(json);
	},
	loadJson: function(key) {
		var value = localStorage[key];
		if (value === undefined || value === null)
			return null;
		
		return JSON.parse(value);
	}
}