Hi everyone,
I've got a custom Web_Services_Object object which I am trying to encode with json_encode(), store it in MySQL DB, then json_decode() back to use it. The problem is that after applying json_decode(), this object becomes stdClass and it must be Web_Services_Object type. Here is a snapshot of what I have:
$client = new Web_Services_Object;
$client->CallAPI();
$obj = json_encode($client);
After json_decode($obj) is done, I get stdClass Object for:
$myObj = json_decode($obj); //is stdClass
But I need it to be of type Web_Services_Object. Please, I am not very knowledgeable with PHP, could you please provide an example how this could be done? I think it has something to do with serializing object but I have no idea how to implement it.
Thank you,
Victor.