I have two development Environments: MAMP (Macintosh, Apache, MySQL, PHP) and IIS with PHP.

I created a development tool in PHP a that simply decodes a JSON string and outputs it for easy viewing:

<form method="post" style="padding-bottom:20px;">
<textarea name="json" cols="75" rows="10"></textarea><br />
<input type="submit" />
</form>

<?php
if(!empty($_POST['json']))
{
	echo '<pre>';
	print_r(json_decode($_POST['json']));
	echo '</pre>';
}
?>

The tool worked well in the IIS with PHP environment, but would choke out every time in MAMP. It kept automatically escaping single quotation marks (‘), double quotation marks (“) and back-slashes ().

It was a php.ini thing, not an environmental thing. The fix? Open up the php.ini file, and make sure your magic_quotes_gpc variable is turned Off, like this:

magic_quotes_gpc = Off

I believe this is default for most PHP environments, except MAMP.