Would anybody know how to use json_encode() to encode and preserve object type? What I have is the following:
Code: Select all
$client = new Web_Services_Object;
$client->CallAPI();
$obj = json_encode($client);
Code: Select all
$myObj = json_decode($obj); //is stdClass
Thank you,
Victor.