This function works pretty well so long as you set header('Content-type: text/plain'); before outputting the return string
http://www.php.net/manual/en/function.json-encode.php#80339
0 && $json[$c-1] != '\\')
{
$in_string = !$in_string;
}
default:
$new_json .= $char;
break;
}
}
return $new_json;
}
?>