Call the API to return json data, how to convert the data into php objects, convenient phpstorm tips?
If you have this json for example:
$j = '{
"a" : 1,
"b" : "test"
}'
Then if you $o = json_decode($j)
you can use $o as a standard object (e.g. $o->{a}
) If you $o = json_decode($j, true)
yon can use $o as associative array (e.g. $o["a"]
)