I have the json object from remote site. When I vardump the json response. The output looks like this..
object(GSResponse)#111 (7) {
["errorCode":"GSResponse":private]=>
int(0)
["errorMessage":"GSResponse":private]=>
NULL
["rawData":"GSResponse":private]=>
string(1808) "{
"UID": "*********",
}
]
}
How can I access the rawData parameter in the json response using php. Is there any function to convert it into php array.
I appreciate any help.
Edited – updated to include the comments
Answer
Lets say that $gsresponsevar is an object of type gsresponse, as defined below.
decode the json response-
Alternatively retrieve the var
Documentation
Extract from: http://developers.gigya.com/030_Server_SDKs/PHP/Reference/Class_GSResponse