title: json_decode behaving unpredictably
body: <p>I am building a public API in php and am having a very strange issue with <code>json_decode()</code>. I am bringing in a large string of JSON that I am dynamically forming and having much trouble in the process. I am attempting to load the JSON object in like this:</p>
  
  <pre><code>$all_related_users_obj = json_decode($this-&gt;get_related_users_raw_JSON($user_id));
  if(is_object($all_related_users_obj)) echo $all_related_users_obj-&gt;tags[0]-&gt;first_name;
  else echo "NOT AN OBJECT";
  </code></pre>
  
  <p>I am finding that this works for about half of the <code>$user_id</code> integers that I pass it but not for the rest. Normally I would assume that my JSON was simply malformed but according to <a href="http://jsonlint.com/" rel="nofollow">JSONlint</a> all of my JSON is properly formed.</p>
  
  <p>I <a href="https://gist.github.com/brannondorsey/5864089" rel="nofollow">created a gist</a> of an example of a JSON file that correctly loads into <code>$all_related_users_obj</code> and one that does not.</p>
  
  <p>Using the <code>json_last_error()</code> function I am receiving the <code>JSON_ERROR_UTF8</code> stating that the JSON contains <code>Malformed UTF-8 characters, possibly incorrectly encoded</code>. I still, however, cannot find the errors.</p>
  
  <p>Your help is much appreciated.</p>