// subs in prototype's JSON parser/encoder if no native one is present
// adapted from http://json.org/json2.js


var JSON = JSON || {};

if (typeof JSON.parse !== 'function') {
	JSON.parse = function(text) {
		return text.evalJSON();
	}
}

if (typeof JSON.stringify !== 'function') {
	JSON.stringify = Object.toJSON;
}
