1. $json_string='{"id":1,"name":"rolf","country":"russia","office":["google","oracle"]} ';
  2. $obj=json_decode($json_string);
  3. //print the parsed data
  4. echo $obj->name; //displays rolf
  5. echo $obj->office[0]; //displays google
复制代码

PHP, JSON


09-19 05:09