json_decode() expects parameter 1 to be string, object given

$data = Weann\Socialite\Facades\Socialite::driver('wechat')->user();//是字符串
$data=json_encode($data);
$data=json_decode($data);

转载于:https://www.cnblogs.com/hgj123/p/5169360.html

你可能感兴趣的:(json,php)