Content-Type: application/json
is just the content header. The content header is just information about the type of returned data, ex::JSON,image(png,jpg,etc..),html.
Keep in mind, that JSON in JavaScript is an array or object. If you want to see all the data, use console.log instead of alert:
alert(response.text); // Will alert "[object Object]" string
console.log(response.text); // Will log all data objects
If you want to alert the original JSON content as a string, then add single quotation marks ('):
echo "'" . json_encode(array('text' => 'omrele')) . "'";
// alert(response.text) will alert {"text":"omrele"}
Do not use double quotes. It will confuse JavaScript, because JSON uses double quotes on each value and key:
echo '<script>var returndata=';
echo '"' . json_encode(array('text' => 'omrele')) . '"';
echo ';</script>';
// It will return the wrong JavaScript code:
<script>var returndata="{"text":"omrele"}";</script>