title: json cannot be decode
body: <p>I have a problem with json,
  I'm using PHP Curl to post file with form-data, and after post the Curl return some weird json</p>
  
  <p>like this </p>
  
  <pre><code>{"code":200,"status":"Success","badges":{"id":"0d28f02d13fe4c7ca8681e2ed0224180","name":"test 5","description":"test 5","image":"http://somesite.id/images/d25273bdc1b54525a602dfca8ab826fdtest.jpg","category":"Upload","target":2}}
  </code></pre>
  
  <p>the problem is, the return result can't be json_decode, I know if this json weird, I can print but cannot be json_decode, </p>
  
  <p>I not have acces to change API, I need the id from badges, 
  is there any trick? or a way to get the id, or some modified so the return result can be decode</p>
  
  <p>i have tried</p>
  
  <pre><code>$a = 'that result';
  $b = "'".$a."'";
  
  $c = json_decode($b);
  </code></pre>
  
  <p>but it still json format, not become array
  need some idea and help, thx</p>
  
  <p>EDITED:</p>
  
  <p>let's say </p>
  
  <pre><code>$result =     {"code":200,"status":"Success","badges":{"id":"0d28f02d13fe4c7ca8681e2ed0224180","name":"test 5","description":"test 5","image":"http://somesite.id/images/d25273bdc1b54525a602dfca8ab826fdtest.jpg","category":"Upload","target":2}}
  
  when I json_decode
  
  $data = json_decode($result);
  var_dump($result );
  print_r($data);
  </code></pre>
  
  <p>it will return</p>
  
  <pre><code>{"code":200,"status":"Success","badges":{"id":"0d28f02d13fe4c7ca8681e2ed0224180","name":"test 5","description":"test 5","image":"http://somesite.id/images/d25273bdc1b54525a602dfca8ab826fdtest.jpg","category":"Upload","target":2}}bool(true) 1
  </code></pre>