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