Ben böyle bir JSON dize var
$test='{"var1":null,"var3":null,"status":{"code":150,"message":"blah blah"}}';
I want to access the status code in the function. this is what i tried:
$responseObj=jsonService->decode($test);//this converts the string into an Object
echo $responseObj->status->code;
Şimdi bu çalışmıyor. Birisi bana doğru yönde işvardırt edebilir. Bence
$responseObj->status->code
is the wrong syntax to use. What is the right syntax. I am using PHP 5.1.6 , this doesnt have the inbuilt json_decode function. So I am using a third party Class to convert. I use the following third party class
- @ Paket Services_JSON
- @ Yazar Michal Migurski
- @ Yazarı Matt Knapp
- @ Yazar Brett Stimmerman
- @ Copyright 2005 Michal Migurski
- @ Sürümü CVS: $ Id: JSON.php, v 1.31 2006/06/28 05:54:17 migurski Uzm $
- @ Lisans http://www.opensource.org/licenses/bsd-license.php
- @ Link http://pear.php.net/pepr/pepr-proposal-show.php?id=198