关于HTTP的post解析json

0

发的是这个:
{ "uuid": "111111", "actions": [ { "code": "switch", "params": { "status": 0, "volume": 0, "delay": 0 } } ]}
接收的是这个:
(
[{"uuid":"ID8603761001-1","actions":_] => Array
(
[{"code": "switch", "params": {"volume": 0, "delay": 0, "status": 0}}] =>
)
)


不能正确解析

已邀请:

walkor

赞同来自:

json_decode($request->rawBody());

wjr

赞同来自:

使用json_decode($request->rawBody());会出错提示:process C:\Users\Administrator\Desktop\server\JzgGW20201016\Applications\JzgApp\start_webapi.php terminated and try to restart

wjr

赞同来自:

是4.X版本的,使用json_decode()就会出错,不使用就正常

要回复问题请先登录注册