fixed deserialize function in APIClient.php