parseJSON error: unexpected character at line 1 column 2 of the JSON data
<p>I have a PHP script like so:</p>

<pre><code>$STL = array();
$filter = array();
$filter['sort_by'] = "date_added";
$filter['sale'] = "F";
$filter['per_page'] = "12";
$STL['filter'] = $filter;
echo json_encode($STL);
</code></pre>

<p>This gives the following output:</p>

<pre><code>{"filter":{"sort_by":"date_added","sale":"F","per_page":"12"}}
</code></pre>

<p>I am trying to use parseJSON like so:</p>

<pre><code>$.ajax({ 
    url: 'myPHP.php',
    type: 'post',
    data : get_session,
    async: false,
    dataType: 'json',
    success: function(result) {
        var json = $.parseJSON(result);         
    } 
});
</code></pre>

<p>But I get the following result:</p>

<blockquote>
  <p>SyntaxError: JSON.parse: unexpected character at line 1 column 2 of the JSON data</p>
</blockquote>

<p>I'm guessing the json string isn't formatted correctly in the PHP.  What I got wrong?</p>