title: Harvest php API array to json
body: <p>Using Harvest php API <a href="http://mdbitz.com/harvest-api/examples/" rel="nofollow">http://mdbitz.com/harvest-api/examples/</a> and my harvest php array prints following data:</p>
  
  <pre><code>$myresult = $harvestAPI-&gt;getUser($client_id);
  $data = $myresult-&gt;get( "data" );
  print_r($data);
  </code></pre>
  
  <p>data:</p>
  
  <pre><code>Harvest_User Object ( [_root:protected] 
  =&gt; user [_convert:protected] 
  =&gt; 1 [_values:protected] 
  =&gt; Array ( [id] 
  =&gt; 999 [email] 
  =&gt; user@example.com [created-at] 
  =&gt; 2014-06-12T20:00:00Z [is-admin] 
  =&gt; false [first-name] 
  =&gt; John [last-name] 
  =&gt; Smith [timezone] 
  =&gt; Mountain Time (US &amp; Canada) [is-contractor] 
  =&gt; false [telephone] 
  =&gt; [is-active] 
  =&gt; true [has-access-to-all-future-projects] 
  =&gt; false [default-hourly-rate] 
  =&gt; 200.0 [department] 
  =&gt; Development [dev] 
  =&gt; false [updated-at] 
  =&gt; 2015-06-15T18:00:00Z [cost-rate] 
  =&gt; 100.0 ) )
  </code></pre>
  
  <p>but when using json class to conver it to json, it gives me empty {} any idea whats happening ?</p>
  
  <pre><code>$dataJSON = json_encode($data);
  print_r($dataJSON);
  </code></pre>