// The following block implements the string.parseJSON method
(function (s) 
{
	var m = {
		'\b': '\\b',
		'\t': '\\t',
		'\n': '\\n',
		'\f': '\\f',
		'\r': '\\r',
		'"' : '\\"',
		'\\': '\\\\'
	};
	s.parseJSON = function (filter)
	{
		try
		{
			if (/^("(\\.|[^"\\\n\r])*?"|[,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t])+?$/
				.test(this))
			{
				var j = eval('(' + this + ')');
				if (typeof filter === 'function')
				{
					function walk(k, v)
					{
						if (v && typeof v === 'object')
						{
							for (var i in v)
							{
								if (v.hasOwnProperty(i))
								{
									v[i] = walk(i, v[i]);
								}
							}
						}
						return filter(k, v);
					}
					j = walk('', j);
				}
				return j;
			}
		}
		catch (e)
		{
			// Fall through if the regexp test fails.
		}
		throw new SyntaxError("parseJSON");
	};
}
)
(String.prototype);
