title: Json encode / decode issues
body: <p>I have this function in PHP</p>
  
  <pre><code>json_encode(unserialize($response)));
  </code></pre>
  
  <p>and I obtain this</p>
  
  <pre><code>{&amp;quot;photosets&amp;quot;:{&amp;quot;cancreate&amp;quot;:1,&amp;quot;page&amp;quot;:1,&amp;quot;pages&amp;quot;:1,&amp;quot;perpage&amp;quot;:2,&amp;quot;total&amp;quot;:2,&amp;quot;photoset&amp;quot;:[{&amp;quot;id&amp;quot;:&amp;quot;7212806405&amp;quot;,&amp;quot;primary&amp;quot;:&amp;quot;1099675&amp;quot;,&amp;quot;secret&amp;quot;:&amp;quot;bdef35451&amp;quot;,&amp;quot;server&amp;quot;:&amp;quot;7384&amp;quot;,&amp;quot;farm&amp;quot;:8,&amp;quot;photos&amp;quot;:3,&amp;quot;videos&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;title&amp;quot;:{&amp;quot;_content&amp;quot;:&amp;quot;Seo&amp;quot;},&amp;quot;description&amp;quot;:{&amp;quot;_content&amp;quot;:&amp;quot;&amp;quot;},&amp;quot;needs_interstitial&amp;quot;:0,&amp;quot;visibility_can_see_set&amp;quot;:1,&amp;quot;count_views&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;count_comments&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;can_comment&amp;quot;:1,&amp;quot;date_create&amp;quot;:&amp;quot;1385114442&amp;quot;,&amp;quot;date_update&amp;quot;:&amp;quot;13855&amp;quot;},{&amp;quot;id&amp;quot;:&amp;quot;721593276&amp;quot;,&amp;quot;primary&amp;quot;:&amp;quot;10991539336&amp;quot;,&amp;quot;secret&amp;quot;:&amp;quot;a94a094acf&amp;quot;,&amp;quot;server&amp;quot;:&amp;quot;7335&amp;quot;,&amp;quot;farm&amp;quot;:8,&amp;quot;photos&amp;quot;:2,&amp;quot;videos&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;title&amp;quot;:{&amp;quot;_content&amp;quot;:&amp;quot;Benzina&amp;quot;},&amp;quot;description&amp;quot;:{&amp;quot;_content&amp;quot;:&amp;quot;&amp;quot;},&amp;quot;needs_interstitial&amp;quot;:0,&amp;quot;visibility_can_see_set&amp;quot;:1,&amp;quot;count_views&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;count_comments&amp;quot;:&amp;quot;0&amp;quot;,&amp;quot;can_comment&amp;quot;:1,&amp;quot;date_create&amp;quot;:&amp;quot;1385113740&amp;quot;,&amp;quot;date_update&amp;quot;:&amp;quot;1385141&amp;quot;}]},&amp;quot;stat&amp;quot;:&amp;quot;ok&amp;quot;}
  </code></pre>
  
  <p>In a page I recall this javascript code</p>
  
  <pre><code>$(function () {
          'use strict';
          $.ajax({
              url         : location.protocol + '//' + location.host + '/gallery_photolist.js',
              data        :   {
                                  type : 'gallery'
                              },
              dataType    : 'json'
          }).done(function (result) {
              console.log('ok');
  </code></pre>
  
  <p>But it doesn't log nothing in console. In effect in Firebug i see that my page call correctly the javascript (i can see the encoded json in the tab) but I think that my script cannot parse correctly the Json (i have not the tab with title "JSON").</p>
  
  <p>Thank you for your help.</p>
  
  <p>EDIT: this is firebug window:</p>
  
  <p><img src="https://i.stack.imgur.com/mHL7U.png" alt="enter image description here"></p>